mirror of
https://github.com/mmahdium/portfolio.git
synced 2026-09-28 02:21:41 +03:30
Removed unused code
This commit is contained in:
+90
-82
@@ -1,90 +1,91 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
srcDir: 'app',
|
||||
|
||||
srcDir: "app",
|
||||
|
||||
// Enable View Transitions API for smooth page transitions
|
||||
experimental: {
|
||||
viewTransition: true
|
||||
viewTransition: true,
|
||||
},
|
||||
|
||||
|
||||
// Configure page and layout transitions
|
||||
app: {
|
||||
baseURL: '/',
|
||||
buildAssetsDir: '/_nuxt/',
|
||||
cdnURL: '/',
|
||||
baseURL: "/",
|
||||
buildAssetsDir: "/_nuxt/",
|
||||
cdnURL: "/",
|
||||
pageTransition: {
|
||||
name: 'page',
|
||||
mode: 'out-in'
|
||||
name: "page",
|
||||
mode: "out-in",
|
||||
},
|
||||
layoutTransition: {
|
||||
name: 'layout',
|
||||
mode: 'out-in'
|
||||
}
|
||||
name: "layout",
|
||||
mode: "out-in",
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
modules: [
|
||||
'@nuxt/content',
|
||||
'@nuxt/fonts',
|
||||
'@nuxt/ui',
|
||||
'@nuxtjs/i18n',
|
||||
'@nuxtjs/color-mode',
|
||||
'@nuxt/image',
|
||||
'@nuxtjs/sitemap'
|
||||
],
|
||||
css: [
|
||||
'~/assets/css/main.css'
|
||||
"@nuxt/content",
|
||||
"@nuxt/fonts",
|
||||
"@nuxt/ui",
|
||||
"@nuxtjs/i18n",
|
||||
"@nuxtjs/color-mode",
|
||||
"@nuxt/image",
|
||||
"@nuxtjs/sitemap",
|
||||
],
|
||||
css: ["~/assets/css/main.css"],
|
||||
postcss: {
|
||||
plugins: {
|
||||
'@csstools/postcss-oklab-function': { preserve: false },
|
||||
'@csstools/postcss-relative-color-syntax': { preserve: false },
|
||||
'@csstools/postcss-color-mix-function': { preserve: false },
|
||||
'postcss-preset-env': {
|
||||
"@csstools/postcss-oklab-function": { preserve: false },
|
||||
"@csstools/postcss-relative-color-syntax": { preserve: false },
|
||||
"@csstools/postcss-color-mix-function": { preserve: false },
|
||||
"postcss-preset-env": {
|
||||
stage: 0,
|
||||
features: {
|
||||
'nesting-rules': true
|
||||
}
|
||||
"nesting-rules": true,
|
||||
},
|
||||
},
|
||||
autoprefixer: {}
|
||||
}
|
||||
autoprefixer: {},
|
||||
},
|
||||
},
|
||||
vite: {
|
||||
css: {
|
||||
lightningcss: {
|
||||
targets: {
|
||||
safari: 15
|
||||
}
|
||||
}
|
||||
}
|
||||
safari: 15,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
fonts: {
|
||||
defaults: {
|
||||
preload: true,
|
||||
weights: [300, 400, 500, 600, 700],
|
||||
styles: ['normal'],
|
||||
subsets: ['latin'],
|
||||
styles: ["normal"],
|
||||
subsets: ["latin"],
|
||||
fallbacks: {
|
||||
'sans-serif': ['system-ui', 'Segoe UI', 'sans-serif'],
|
||||
serif: ['Georgia', 'Times New Roman', 'serif']
|
||||
}
|
||||
"sans-serif": ["system-ui", "Segoe UI", "sans-serif"],
|
||||
serif: ["Georgia", "Times New Roman", "serif"],
|
||||
},
|
||||
},
|
||||
families: [
|
||||
{ name: 'Fraunces', provider: 'google', weights: [600, 700] },
|
||||
{ name: 'Inter', provider: 'google', weights: [400, 500, 600, 700] },
|
||||
{ name: 'Outfit', provider: 'google', weights: [300, 400, 500, 600, 700] }
|
||||
]
|
||||
{ name: "Fraunces", provider: "google", weights: [600, 700] },
|
||||
{ name: "Inter", provider: "google", weights: [400, 500, 600, 700] },
|
||||
{
|
||||
name: "Outfit",
|
||||
provider: "google",
|
||||
weights: [300, 400, 500, 600, 700],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
loadPlausible: "", // overrided by env,
|
||||
siteUrl: 'https://aliarghyani.vercel.app' // Used for sitemap and RSS generation
|
||||
siteUrl: "https://mahdium.ir", // Used for sitemap and RSS generation
|
||||
},
|
||||
},
|
||||
|
||||
// Site configuration for sitemap
|
||||
site: {
|
||||
url: 'https://aliarghyani.vercel.app'
|
||||
url: "https://mahdium.ir",
|
||||
} as any,
|
||||
|
||||
// Sitemap configuration
|
||||
@@ -92,9 +93,9 @@ export default defineNuxtConfig({
|
||||
gzip: true,
|
||||
exclude: [],
|
||||
defaults: {
|
||||
changefreq: 'monthly',
|
||||
priority: 0.8
|
||||
}
|
||||
changefreq: "monthly",
|
||||
priority: 0.8,
|
||||
},
|
||||
} as any,
|
||||
|
||||
image: {
|
||||
@@ -106,9 +107,9 @@ export default defineNuxtConfig({
|
||||
md: 768,
|
||||
lg: 1024,
|
||||
xl: 1280,
|
||||
'2xl': 1536
|
||||
"2xl": 1536,
|
||||
},
|
||||
formats: ['webp', 'jpg']
|
||||
formats: ["webp", "jpg"],
|
||||
},
|
||||
typescript: {
|
||||
shim: false,
|
||||
@@ -131,75 +132,82 @@ export default defineNuxtConfig({
|
||||
storageKey: "nuxt-color-mode",
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// Nuxt Content configuration
|
||||
content: {
|
||||
// Disable experimental features that require native dependencies
|
||||
experimental: {
|
||||
clientDB: false,
|
||||
cacheContents: false
|
||||
cacheContents: false,
|
||||
},
|
||||
markdown: {
|
||||
mdc: true,
|
||||
toc: {
|
||||
depth: 3,
|
||||
searchDepth: 3
|
||||
}
|
||||
searchDepth: 3,
|
||||
},
|
||||
},
|
||||
documentDriven: false,
|
||||
respectPathCase: true
|
||||
respectPathCase: true,
|
||||
},
|
||||
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
strategy: 'prefix_except_default',
|
||||
defaultLocale: "en",
|
||||
strategy: "prefix_except_default",
|
||||
locales: [
|
||||
{ code: 'en', language: 'en-US', name: 'English', dir: 'ltr', file: 'en.json' },
|
||||
{ code: 'fa', language: 'fa-IR', name: 'فارسی', dir: 'rtl', file: 'fa.json' },
|
||||
{
|
||||
code: "en",
|
||||
language: "en-US",
|
||||
name: "English",
|
||||
dir: "ltr",
|
||||
file: "en.json",
|
||||
},
|
||||
{
|
||||
code: "fa",
|
||||
language: "fa-IR",
|
||||
name: "فارسی",
|
||||
dir: "rtl",
|
||||
file: "fa.json",
|
||||
},
|
||||
],
|
||||
langDir: 'locales',
|
||||
langDir: "locales",
|
||||
detectBrowserLanguage: {
|
||||
useCookie: true,
|
||||
cookieKey: 'i18n_redirected',
|
||||
cookieKey: "i18n_redirected",
|
||||
alwaysRedirect: false,
|
||||
redirectOn: 'root'
|
||||
redirectOn: "root",
|
||||
},
|
||||
// Keep runtime vue-i18n options (legacy, warnings)
|
||||
vueI18n: '~/i18n.config.ts'
|
||||
vueI18n: "~/i18n.config.ts",
|
||||
},
|
||||
|
||||
// Prerender blog routes
|
||||
nitro: {
|
||||
prerender: {
|
||||
crawlLinks: true,
|
||||
routes: ['/', '/blog', '/fa/blog'],
|
||||
routes: ["/", "/blog", "/fa/blog"],
|
||||
failOnError: false,
|
||||
ignore: ['/_vercel/image']
|
||||
ignore: ["/_vercel/image"],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
// Route rules for caching and optimization
|
||||
routeRules: {
|
||||
// Blog routes caching
|
||||
'/blog': { swr: 3600 },
|
||||
'/fa/blog': { swr: 3600 },
|
||||
'/blog/**': { swr: 3600 },
|
||||
'/fa/blog/**': { swr: 3600 }
|
||||
"/blog": { swr: 3600 },
|
||||
"/fa/blog": { swr: 3600 },
|
||||
"/blog/**": { swr: 3600 },
|
||||
"/fa/blog/**": { swr: 3600 },
|
||||
},
|
||||
|
||||
devtools: { enabled: false },
|
||||
// devtools: { enabled: false },
|
||||
compatibilityDate: "2024-07-10",
|
||||
|
||||
components: {
|
||||
dirs: [
|
||||
{
|
||||
path: '~/components',
|
||||
pathPrefix: false
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
path: "~/components",
|
||||
pathPrefix: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user