forked from postalserver/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.js
More file actions
39 lines (34 loc) · 780 Bytes
/
nuxt.config.js
File metadata and controls
39 lines (34 loc) · 780 Bytes
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
import theme from '@nuxt/content-theme-docs'
const createSitemapRoutes = async () => {
const { $content } = require('@nuxt/content')
let routes = [];
const posts = await $content({ deep: true })
.only(['to'])
.fetch()
posts.forEach( function( post, index ){
// For some reason it always pulls the settings.json from the content.
if( post.to != '//settings' ){
routes.push( post.to );
}
});
return routes;
}
export default theme({
env: {
GITHUB_TOKEN: process.env.GITHUB_TOKEN
},
loading: { color: '#00CD81' },
i18n: {
defaultLocale: 'en'
},
modules: [
'@nuxtjs/sitemap'
],
buildModules: [
],
sitemap: {
hostname: 'https://docs.postalserver.io',
gzip: true,
routes: createSitemapRoutes
},
})