diff --git a/layout/_partial/main/navbar/breadcrumb.ejs b/layout/_partial/main/navbar/breadcrumb.ejs index 8061013..9bc2014 100644 --- a/layout/_partial/main/navbar/breadcrumb.ejs +++ b/layout/_partial/main/navbar/breadcrumb.ejs @@ -62,7 +62,7 @@ function layoutDiv() { let url_proj = url_for(proj.homepage.path); if (nodes.includes(url_proj) === false) { el += ''; - el += '' + proj.title + ''; + el += '' + (proj.name || proj.title) + ''; } el += ''; // 更新日期 diff --git a/layout/_partial/main/post_list/wiki_card.ejs b/layout/_partial/main/post_list/wiki_card.ejs index 456f33b..65b3d2a 100644 --- a/layout/_partial/main/post_list/wiki_card.ejs +++ b/layout/_partial/main/post_list/wiki_card.ejs @@ -16,7 +16,7 @@ function layoutDiv() { let tag = proj.tags[0]; el += '
'; } - el += '' + proj.description + '
'; } diff --git a/layout/_partial/sidebar/logo.ejs b/layout/_partial/sidebar/logo.ejs index c810444..61db100 100644 --- a/layout/_partial/sidebar/logo.ejs +++ b/layout/_partial/sidebar/logo.ejs @@ -39,7 +39,7 @@ function layoutDiv() { } } if (proj != undefined) { - let main = proj.title || proj.wiki || page.wiki || page.title; + let main = proj.name || proj.title || proj.wiki || page.wiki || page.title; let url = proj.homepage.path; let sub = proj.subtitle; el += layoutTitle(main, url, sub); diff --git a/layout/_partial/sidebar/widgets/recent.ejs b/layout/_partial/sidebar/widgets/recent.ejs index ae68938..6cc1b92 100644 --- a/layout/_partial/sidebar/widgets/recent.ejs +++ b/layout/_partial/sidebar/widgets/recent.ejs @@ -31,8 +31,8 @@ function layoutDiv() { el += '' if (post.layout == 'wiki') { let proj = theme.wiki.projects[post.wiki]; - if (proj && proj.title) { - el += proj.title + ' / '; + if (proj && proj.name) { + el += proj.name + ' / '; } else if (post.wiki) { el += post.wiki + ' / '; } diff --git a/scripts/events/lib/doc_tree.js b/scripts/events/lib/doc_tree.js index 16bb972..0bb0117 100644 --- a/scripts/events/lib/doc_tree.js +++ b/scripts/events/lib/doc_tree.js @@ -77,6 +77,9 @@ module.exports = hexo => { if (proj.title == undefined || proj.title.length === 0) { proj.title = id; } + if (proj.name == undefined || proj.name.length == 0) { + proj.name = id; + } } // 补充 order wiki_pages.forEach((p, i) => { diff --git a/source/css/_layout/list.styl b/source/css/_layout/list.styl index e7a5633..e71cb78 100644 --- a/source/css/_layout/list.styl +++ b/source/css/_layout/list.styl @@ -20,7 +20,6 @@ margin: 0.5rem 0 .wiki .post-title margin-top: 0.5rem - font-weight: 700 // card .post-list .post-card diff --git a/source/css/_layout/sidebar/widgets.styl b/source/css/_layout/sidebar/widgets.styl index e2286af..5021613 100644 --- a/source/css/_layout/sidebar/widgets.styl +++ b/source/css/_layout/sidebar/widgets.styl @@ -69,6 +69,7 @@ color: $color-hover .widget-wrap#related .widget-body a margin-top: 0.5rem + margin-bottom: 1rem .title font-weight: 700 font-size: $fs-14