mirror of
https://github.com/mmahdium/portfolio.git
synced 2026-09-28 02:21:41 +03:30
feat: enhance blog components, improve routing, and add clean script for build process
This commit is contained in:
+9
-2
@@ -1,4 +1,10 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
const isGenerate = process.env.npm_lifecycle_event === 'generate'
|
||||
|
||||
const prerenderIgnore = ['/_vercel/image']
|
||||
// When generating a static site, we must not ignore internal endpoints/assets that the client fetches at runtime.
|
||||
if (!isGenerate) prerenderIgnore.push('/_ipx', '/_nuxt', '/_i18n', '/__nuxt_content')
|
||||
|
||||
export default defineNuxtConfig({
|
||||
srcDir: 'app',
|
||||
|
||||
@@ -83,6 +89,7 @@ export default defineNuxtConfig({
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
loadPlausible: "", // overrided by env,
|
||||
siteName: 'AliArghyani',
|
||||
siteUrl: 'https://aliarghyani.vercel.app', // Used for sitemap and RSS generation
|
||||
githubToken: '' // GitHub API token - set via NUXT_PUBLIC_GITHUB_TOKEN env variable
|
||||
},
|
||||
@@ -177,8 +184,8 @@ export default defineNuxtConfig({
|
||||
crawlLinks: true,
|
||||
routes: ['/', '/blog', '/fa/blog', '/blog/rss.xml', '/fa/blog/rss.xml'],
|
||||
failOnError: false,
|
||||
// Avoid crawling and prerendering internal/asset endpoints (speeds up builds significantly)
|
||||
ignore: ['/_vercel/image', '/_ipx', '/_nuxt', '/_i18n', '/__nuxt_content']
|
||||
// Avoid crawling internal endpoints during SSR builds (speeds up builds significantly)
|
||||
ignore: prerenderIgnore
|
||||
},
|
||||
devProxy: {
|
||||
host: '0.0.0.0'
|
||||
|
||||
Reference in New Issue
Block a user