try to make redirect work properly in static
This commit is contained in:
1 parent
f76b1fec34
commit
cf94c66807
2 files changed
+2
-4
No files matched your search
@@ -8,6 +8,8 @@ const config = async (): Promise<NuxtConfig> => {
|
|||||||
const theme = getTheme()
|
const theme = getTheme()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
target: 'static',
|
||||||
|
|
||||||
// Global page headers (https://go.nuxtjs.dev/config-head)
|
// Global page headers (https://go.nuxtjs.dev/config-head)
|
||||||
head: {
|
head: {
|
||||||
title: theme.title,
|
title: theme.title,
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { Vue, Component } from 'nuxt-property-decorator'
|
|||||||
|
|
||||||
@Component<BlogPage>({
|
@Component<BlogPage>({
|
||||||
async asyncData({ $axios }) {
|
async asyncData({ $axios }) {
|
||||||
if (process.static && typeof location !== 'undefined') {
|
|
||||||
location.reload()
|
|
||||||
}
|
|
||||||
|
|
||||||
const { result, count } = await $axios.$get('/api/q')
|
const { result, count } = await $axios.$get('/api/q')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in new issue
Block a user