fix/slug-undefined-html

This commit is contained in:
tangly1024
2023-07-07 21:10:37 +08:00
parent 45b0e2672d
commit dd6dc5a93a
3 changed files with 8 additions and 8 deletions

View File

@@ -97,7 +97,7 @@ export async function getStaticPaths() {
export async function getStaticProps({ params: { slug } }) {
let fullSlug = slug.join('/')
if (BLOG.PSEUDO_STATIC) {
if (JSON.parse(BLOG.PSEUDO_STATIC)) {
if (!fullSlug.endsWith('.html')) {
fullSlug += '.html'
}