2.3 KiB
Implementation Plan
-
1. Install and configure sitemap module
- Install
nuxt-simple-sitemappackage - Add module to
nuxt.config.ts - Configure basic sitemap settings with site URL
- Requirements: 3.1, 3.2, 3.3
- Install
-
2. Create dynamic route generator for blog posts
- Create
server/plugins/prerender.tsfile - Implement Nitro hook to discover all blog posts
- Add all non-draft blog post routes to prerender context
- Handle both English and Persian locales
- Requirements: 2.1, 2.2, 2.3, 2.4
- Create
-
3. Configure Nitro prerender settings
-
Update
nitro.prerenderconfiguration innuxt.config.ts -
Enable
crawlLinksfor automatic link discovery -
Add seed routes for blog index pages (
/blog,/fa/blog) -
Configure prerender to exclude draft posts
-
Requirements: 1.3, 1.4, 4.1
-
-
4. Implement sitemap dynamic routes
-
Configure sitemap module to fetch blog posts dynamically
-
Map blog posts to sitemap entries with proper metadata
-
Include
lastmod,changefreq, andpriorityfor each entry -
Ensure draft posts are excluded from sitemap
-
Requirements: 3.1, 3.2, 3.3, 3.4, 3.5
-
-
5. Update build configuration
- Verify
nuxt generatecommand inpackage.json - Add environment variable for site URL if needed
- Document build process in README or comments
- Requirements: 4.4, 6.1, 6.3
- Verify
-
6. Test SSG build process
- Run
pnpm generatecommand - Verify all blog post HTML files are generated in
.output/public - Check both English and Persian blog routes
- Verify sitemap.xml is generated
- Requirements: 1.1, 1.2, 4.3, 4.4
- Run
-
* 7. Validate generated output
- Check meta tags in generated HTML files
- Verify structured data (JSON-LD) is present
- Test internal links functionality
- Validate sitemap XML syntax
- Requirements: 5.1, 5.2, 5.3, 5.4
-
* 8. Performance testing
- Measure page load times before and after SSG
- Run Lighthouse audit on generated pages
- Document performance improvements
- Requirements: 1.1, 1.2
-
9. Update deployment documentation
- Document the
pnpm generatecommand for deployment - Specify output directory (
.output/public) - List compatible static hosting platforms
- Add environment variables needed for production
- Requirements: 6.1, 6.2, 6.4
- Document the