mirror of
https://github.com/andatoshiki/toshiki-home-nuxt3.git
synced 2026-06-06 04:24:15 +00:00
fix(blog post skeleton loader): remove function to force blog post content to load on origin static content serving serverless application that leads to 404 error code as a response in return for inable to corretly address the blog post page route location with slug function to match page location of spa applications & rmeove default pre-load blog post skeleton that causes nuxt fails to generate corresponded directory output for each route of blog post dir with an index produced within & re-lint and refactored all project root sources to align with appropriate codebase prettiter and eslint rules to improvise code readabilitiies
This commit is contained in:
parent
af6bf329ce
commit
b2e6631497
@ -16,7 +16,6 @@ export default Vue.extend({
|
|||||||
posts: [] as (Post[] & FetchReturn) | (Post[] & FetchReturn)[]
|
posts: [] as (Post[] & FetchReturn) | (Post[] & FetchReturn)[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetchOnServer: false,
|
|
||||||
async fetch() {
|
async fetch() {
|
||||||
const posts = await this.$content('blog').sortBy('createdAt', 'desc').without(['body']).fetch<Post[]>()
|
const posts = await this.$content('blog').sortBy('createdAt', 'desc').without(['body']).fetch<Post[]>()
|
||||||
|
|
||||||
@ -24,7 +23,8 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
head() {
|
head() {
|
||||||
const title = "Toshiki's Blog"
|
const title = "Toshiki's Blog"
|
||||||
const description = 'Real life stories anecdotes & developmental journeys for embarking your inspirations.'
|
const description =
|
||||||
|
"Real life stories anecdotes & developmental journeys for embarking your inspirations."
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: 'Blog',
|
title: 'Blog',
|
||||||
@ -77,9 +77,7 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<LoadersBlog v-if="$fetchState.pending || $fetchState.error !== null" />
|
<div class="pt-12 space-y-10 margin">
|
||||||
|
|
||||||
<div v-else class="mt-12 space-y-10">
|
|
||||||
<section v-for="[year, posts] in getYearGroupedPosts" :key="year" class="space-y-4">
|
<section v-for="[year, posts] in getYearGroupedPosts" :key="year" class="space-y-4">
|
||||||
<h1 class="text-3xl font-bold text-black/90 dark:text-white/90">
|
<h1 class="text-3xl font-bold text-black/90 dark:text-white/90">
|
||||||
{{ year }}
|
{{ year }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user