Merge remote-tracking branch 'origin/main' into dynamic-theme

This commit is contained in:
tangly1024
2022-03-09 17:41:57 +08:00
24 changed files with 230 additions and 85 deletions

View File

@@ -24,6 +24,7 @@ export default {
AUTHOR: 'Author',
URL: 'URL',
POSTS: 'Posts',
ARTICLE: 'Article',
VISITORS: 'Visitors',
VIEWS: 'Views',
COPYRIGHT_NOTICE: 'All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!',

View File

@@ -26,6 +26,7 @@ export default {
URL: '链接',
ANALYTICS: '统计',
POSTS: '篇文章',
ARTICLE: '文章',
VISITORS: '位访客',
VIEWS: '次查看',
COPYRIGHT_NOTICE: '本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。',

View File

@@ -97,7 +97,11 @@ async function getCustomNav ({ notionPageData }) {
const customNav = []
if (allPage && allPage.length > 0) {
allPage.forEach(p => {
customNav.push({ icon: p.icon || null, name: p.title, to: '/' + p.slug, show: true })
if (p?.slug?.indexOf('http') === 0) {
customNav.push({ icon: p.icon || null, name: p.title, to: p.slug, show: true })
} else {
customNav.push({ icon: p.icon || null, name: p.title, to: '/' + p.slug, show: true })
}
})
}
return customNav