Merge pull request #2504 from tangly1024/fix/pseudo-static-index-url

fix 伪静态 index url 异常
This commit is contained in:
tangly1024
2024-06-17 10:53:56 +08:00
committed by GitHub

View File

@@ -192,7 +192,10 @@ export function adjustPageProperties(properties, NOTION_CONFIG) {
if (siteConfig('PSEUDO_STATIC', false, NOTION_CONFIG)) { if (siteConfig('PSEUDO_STATIC', false, NOTION_CONFIG)) {
if ( if (
!properties?.href?.endsWith('.html') && !properties?.href?.endsWith('.html') &&
!properties?.href?.startsWith('http') !properties?.href?.startsWith('http') &&
properties?.href !== '' &&
properties?.href !== '#' &&
properties?.href !== '/'
) { ) {
properties.href += '.html' properties.href += '.html'
} }