pycontw / pycontw-frontend

The official website for PyCon TW 🐍
16 stars 36 forks source link

Adopt dynamic route for SSG and site preview on gh-page and netlify #388

Open josix opened 1 year ago

josix commented 1 year ago

Currently, Nuxt's SSG mode is generating static HTML files which does not account for dynamic content that depends on external data sources or unpublished content. This means preview branches do not reflect the complete site with dynamic and unpublished content. We need to enable dynamic route generation and data fetching for Nuxt SSG so that it can build routes and fetch data for dynamic and unpublished content. This will allow previewing the complete site with dynamic and unpublished content on preview branches.

Please refer to #339 and #338 that adding generate configuration in nuxt.config.js and update the asyncData in each page to fetch data from external sources.

Ritabear commented 1 year ago

@josix

josix commented 1 year ago

Hi @Ritabear, could you help me create another PR for this change. Thanks!