This template should help get you started developing with Vue 3 in Vite.
VSCode + Volar (and disable Vetur).
See Vite Configuration Reference.
npm installnpm run devnpm run buildCanonical and social metadata use these variables:
VITE_CANONICAL_ORIGIN- canonical domain origin, example:https://mud-tech-blog.web.appVITE_ENFORCE_CANONICAL_REDIRECT- set totrueto force redirect from non-canonical hostsVITE_TWITTER_SITE- optional Twitter handle fortwitter:sitetag, example:@mudtechblog
Build now includes static prerender for key routes:
//blog/about/updates
Command:
npm run buildCurrent limitation:
- Dynamic article routes (
/blog/:slug) are still client-rendered and require a separate dynamic prerender pipeline.
npm run build now also regenerates dist/sitemap.xml from live article routes.
Source:
- Shopify Storefront API (
blogByHandle: news) - Route handles are converted to
/blog/:slugURLs lastmoduses articleupdatedAt(fallback topublishedAt)
Notes:
- Static routes
/,/blog,/about,/updatesare always included. robots.txtis generated at build time from canonical origin (no manual host hardcode).- Build includes
verify-seo-host-configcheck to validate robots/sitemap host consistency.
npm run seo:smokevalidates built HTML for key routes (/,/blog,/about,/updates):- title
- meta description
- canonical
- robots
- JSON-LD presence/validity
- CI workflow
.github/workflows/seo-quality.ymlruns:- unit tests
- build
- SEO smoke checks
- Lighthouse CI with SEO thresholds (
.lighthouserc.json)