🗽

Events in New York

Page 1 of 5 • 6 events per page

Route: /events/new-york/1
1
Current Page
6
Events Shown
30
Total Events
EST
Timezone
Workshop #1

Art Workshop 1

5/7/2026 at 2:00 AM
New York Convention Center Hall B
60 attending
$63
Meetup #2

Music Meetup 2

5/8/2026 at 3:00 PM
New York Convention Center Hall C
190 attending
$109
Seminar #3

Food Seminar 3

5/9/2026 at 4:00 AM
New York Convention Center Hall D
167 attending
Free
Concert #4

Business Concert 4

5/10/2026 at 5:00 PM
New York Convention Center Hall E
142 attending
$119
Festival #5

Health Festival 5

5/11/2026 at 6:00 AM
New York Convention Center Hall F
55 attending
$20
Conference #6

Education Conference 6

5/12/2026 at 7:00 PM
New York Convention Center Hall A
173 attending
Free

Pagination Route Details

File path: /pages/events/[city]/[page].astro
Static paths: Pre-generated for 5 cities × 5 pages = 25 routes
Current params: city="new-york", page="1"

Pagination Implementation

---
export function getStaticPaths() {
  const cities = ['san-francisco', 'new-york', 'london'];
  const maxPages = 5;

  return cities.flatMap(city => 
    Array.from({ length: maxPages }, (_, i) => ({
      params: { 
        city: city, 
        page: (i + 1).toString() 
      }
    }))
  );
}

const { city, page } = Astro.params;
const currentPage = parseInt(page || '1');
const events = getEventsForPage(city, currentPage);
---

<h1>Events in {city} - Page {currentPage}</h1>