-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
173 lines (171 loc) · 4.83 KB
/
Copy pathnuxt.config.ts
File metadata and controls
173 lines (171 loc) · 4.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2024-11-01',
devtools: { enabled: true },
modules: [
'@nuxthub/core',
'@nuxtjs/tailwindcss',
'@pinia/nuxt',
'@vueuse/nuxt',
'pinia-plugin-persistedstate',
'@formkit/auto-animate',
'@nuxtjs/sitemap',
'@nuxtjs/color-mode',
'@nuxtjs/robots',
'shadcn-nuxt',
'@nuxt/icon',
'@nuxtjs/seo',
'nuxt-schema-org'
],
tailwindcss: {
cssPath: '~/assets/css/tailwind.css',
configPath: 'tailwind.config.ts',
exposeConfig: true,
viewer: true,
},
robots: {
enabled: true,
sitemap: ['/sitemap.xml'],
allow: ['/'],
disallow: ['/api/']
},
shadcn: {
prefix: '',
componentDir: './components/ui'
},
colorMode: {
classSuffix: '',
preference: 'system',
fallback: 'light',
dataValue: 'theme'
},
runtimeConfig: {
public: {
githubToken: process.env.NUXT_HUB_GITHUB_TOKEN
}
},
site: {
url: process.env.NUXT_PUBLIC_SITE_URL || 'https://github-explorer.nuxt.dev',
name: 'GitHub Open Source Explorer',
description: 'Explore amazing open source projects on GitHub',
defaultLocale: 'en'
},
sitemap: {
enabled: true,
urls: [
'/',
'/about',
'/topics',
'/collections'
],
defaults: {
changefreq: 'daily',
priority: 0.8,
lastmod: new Date().toISOString()
}
},
schemaOrg: {
identity: {
type: 'Organization',
name: 'GitHub Open Source Explorer',
url: 'https://github-explorer.nuxt.dev',
logo: 'https://github-explorer.nuxt.dev/logo.png'
},
host: 'https://github-explorer.nuxt.dev',
canonicalHost: 'https://github-explorer.nuxt.dev'
},
routeRules: {
// Página principal
'/': {
sitemap: { priority: 1.0, changefreq: 'daily' },
seoMeta: {
title: 'GitHub Open Source Explorer - Discover Amazing Projects',
description: 'Explore thousands of open source projects, find new tools, libraries and frameworks on GitHub.',
ogImage: '/images/home-og.png',
}
},
// Páginas de colecciones
'/collections': {
sitemap: { priority: 0.9, changefreq: 'daily' },
seoMeta: {
title: 'Collections - Curated Open Source Projects',
description: 'Browse curated collections of open source projects organized by purpose and technology.',
ogImage: '/images/collections-og.png',
}
},
'/collections/**': {
sitemap: { priority: 0.8, changefreq: 'weekly' },
seoMeta: {
titleTemplate: '%s Collection - GitHub Open Source Explorer',
ogType: 'article',
author: 'GitHub Open Source Explorer'
}
},
// Páginas de temas
'/topics': {
sitemap: { priority: 0.9, changefreq: 'daily' },
seoMeta: {
title: 'Topics - Browse by Technology and Concept',
description: 'Explore open source projects by programming language, framework, or concept.',
ogImage: '/images/topics-og.png',
}
},
'/topics/**': {
sitemap: { priority: 0.8, changefreq: 'weekly' },
seoMeta: {
titleTemplate: '%s Projects - GitHub Open Source Explorer',
ogType: 'article',
author: 'GitHub Open Source Explorer'
}
},
// Páginas de repositorios
'/repository/**': {
sitemap: { priority: 0.8, changefreq: 'weekly' },
seoMeta: {
titleTemplate: '%s - Open Source Repository',
ogType: 'article',
author: 'GitHub Open Source Explorer'
}
},
// Página About
'/about': {
sitemap: { priority: 0.7, changefreq: 'monthly' },
seoMeta: {
title: 'About - GitHub Open Source Explorer',
description: 'Learn more about GitHub Open Source Explorer and the technology behind it.',
ogImage: '/images/about-og.png',
}
},
// Rutas de API
'/api/**': {
sitemap: false,
robots: false,
index: false
}
},
// SEO meta tags globales
app: {
head: {
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'format-detection', content: 'telephone=no' },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:site', content: '@SeanLuis' },
{ name: 'twitter:creator', content: '@SeanLuis' },
{ name: 'theme-color', content: '#0D1117' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'manifest', href: '/manifest.json' }
]
}
},
// Reglas de caché para recursos estáticos
nitro: {
routeRules: {
'/images/**': { headers: { 'cache-control': 'max-age=31536000' } },
'/fonts/**': { headers: { 'cache-control': 'max-age=31536000' } },
'/manifest.json': { prerender: false }
}
}
})