netlify is more reliable

This commit is contained in:
Pacharapol Withayasakpunt committed 2019-12-25 13:30:54 +07:00
1 parent 7fe8f5d154
commit 4dfff986d4
16 files changed
+42 -105

No files matched your search

+16
View File
@@ -1,4 +1,6 @@
import { Configuration } from '@nuxt/types'
import tag from './static/build/tag/posts.json'
import posts from './static/build/header/posts.json'
const config: Configuration = {
mode: 'universal',
@@ -90,8 +92,22 @@ const config: Configuration = {
})
},
},
generate: {
routes: [
...Object.keys(tag).map((el) => `/tag/${el}`),
...Object.values(posts).map((el) => {
return el.y && el.mo ? `/post/${el.y}/${el.mo}/${el.name}` : `/post/${el.name}`
}),
],
fallback: true,
},
env: {
title: '中文 Diary',
tags: JSON.stringify(tag),
hash: JSON.stringify({
posts: require('./static/build/hash/posts.json'),
slides: require('./static/build/hash/slides.json'),
}),
},
}