🗽

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

12/16/2025 at 2:00 AM
New York Convention Center Hall B
109 attending
$114
Meetup #2

Music Meetup 2

12/17/2025 at 3:00 PM
New York Convention Center Hall C
145 attending
$95
Seminar #3

Food Seminar 3

12/18/2025 at 4:00 AM
New York Convention Center Hall D
184 attending
Free
Concert #4

Business Concert 4

12/19/2025 at 5:00 PM
New York Convention Center Hall E
68 attending
$65
Festival #5

Health Festival 5

12/20/2025 at 6:00 AM
New York Convention Center Hall F
160 attending
$49
Conference #6

Education Conference 6

12/21/2025 at 7:00 PM
New York Convention Center Hall A
127 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>