🗽

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

2/4/2026 at 2:00 AM
New York Convention Center Hall B
199 attending
$25
Meetup #2

Music Meetup 2

2/5/2026 at 3:00 PM
New York Convention Center Hall C
142 attending
$76
Seminar #3

Food Seminar 3

2/6/2026 at 4:00 AM
New York Convention Center Hall D
171 attending
Free
Concert #4

Business Concert 4

2/7/2026 at 5:00 PM
New York Convention Center Hall E
156 attending
$21
Festival #5

Health Festival 5

2/8/2026 at 6:00 AM
New York Convention Center Hall F
110 attending
$104
Conference #6

Education Conference 6

2/9/2026 at 7:00 PM
New York Convention Center Hall A
89 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>