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

+3 -3
View File
@@ -23,7 +23,7 @@ import PostHeader from './PostHeader.vue'
import Empty from './Empty.vue'
import { Vue, Component, Prop, Watch } from 'nuxt-property-decorator'
import { makeHtml } from '../assets/make-html'
import { globalStore } from '../store'
import { HASH } from '../assets/util'
@Component({
components: {
@@ -44,9 +44,9 @@ export default class PostFull extends Vue {
@Watch('header.path')
async updatePost () {
if (!this.markdown) {
this.markdown = await fetch(`/build/teaser/${this.header.path}?h=${globalStore.hash.posts[this.header.path]}`).then((r) => r.text())
this.markdown = await fetch(`/build/teaser/${this.header.path}?h=${HASH.posts[this.header.path]}`).then((r) => r.text())
}
this.markdown = await fetch(`/build/full/${this.header.path}?h=${globalStore.hash.posts[this.header.path]}`).then((r) => r.text())
this.markdown = await fetch(`/build/full/${this.header.path}?h=${HASH.posts[this.header.path]}`).then((r) => r.text())
}
get html () {
+3 -4
View File
@@ -17,9 +17,8 @@ section
import PostTeaser from './PostTeaser.vue'
import Empty from './Empty.vue'
import QParser from 'q2filter'
import { normalizeArray, searchPosts } from '@/assets/util'
import { normalizeArray, searchPosts, HASH } from '@/assets/util'
import { Vue, Component, Prop, Watch } from 'nuxt-property-decorator'
import { globalStore } from '../store'
@Component({
components: {
@@ -70,10 +69,10 @@ export default class PostQuery extends Vue {
tag: this.tag,
} : this.q,
current: true,
posts: await fetch(`/build/header/posts.json?h=${globalStore.hash.posts._header}`).then((r) => r.json()),
posts: await fetch(`/build/header/posts.json?h=${HASH.posts._header}`).then((r) => r.json()),
}).map(async (h) => {
if (!h.teaser) {
h.teaser = await fetch(`/build/teaser/${h.path}?h=${globalStore.hash.posts[h.path]}`).then((r) => r.text())
h.teaser = await fetch(`/build/teaser/${h.path}?h=${HASH.posts[h.path]}`).then((r) => r.text())
}
return h
}))
+2 -2
View File
@@ -15,7 +15,7 @@
import PostHeader from './PostHeader.vue'
import { Vue, Component, Prop } from 'nuxt-property-decorator'
import { makeHtml } from '../assets/make-html'
import { globalStore } from '../store'
import { HASH } from '../assets/util'
@Component({
components: {
@@ -29,7 +29,7 @@ export default class PostTeaser extends Vue {
async mounted () {
if (!this.teaser) {
this.teaser = await fetch(`/build/teaser/${this.header.path}.html?h=${globalStore.hash.posts[this.header.path]}`)
this.teaser = await fetch(`/build/teaser/${this.header.path}.html?h=${HASH.posts[this.header.path]}`)
.then((r) => r.text())
}
}