[fix] wiki’s bugs #341
This commit is contained in:
parent
48a6da7871
commit
28b4772bb2
|
@ -84,7 +84,7 @@ function layoutDiv() {
|
||||||
el += '</div>';
|
el += '</div>';
|
||||||
el += '</div>';
|
el += '</div>';
|
||||||
|
|
||||||
let repo = page.repo || proj.repo
|
const repo = page.repo || proj?.repo
|
||||||
if (repo) {
|
if (repo) {
|
||||||
el += `
|
el += `
|
||||||
<div class="right ghrepo stellar-ghinfo-api" api="${theme.api_host.ghapi}/repos/${repo}">
|
<div class="right ghrepo stellar-ghinfo-api" api="${theme.api_host.ghapi}/repos/${repo}">
|
||||||
|
|
|
@ -59,7 +59,7 @@ module.exports = ctx => {
|
||||||
const wiki_pages = pages.filter(p => (p.layout === 'wiki')).map(p => new WikiPage(p))
|
const wiki_pages = pages.filter(p => (p.layout === 'wiki')).map(p => new WikiPage(p))
|
||||||
const wiki_list = Object.keys(wiki.tree)
|
const wiki_list = Object.keys(wiki.tree)
|
||||||
// 上架的项目列表
|
// 上架的项目列表
|
||||||
wiki.shelf = ctx.locals.get('data').wiki
|
wiki.shelf = ctx.locals.get('data').wiki || []
|
||||||
|
|
||||||
// 数据整合:项目标签
|
// 数据整合:项目标签
|
||||||
var all_tag_name = []
|
var all_tag_name = []
|
||||||
|
@ -202,7 +202,6 @@ module.exports = ctx => {
|
||||||
|
|
||||||
wiki.all_tags = all_tags
|
wiki.all_tags = all_tags
|
||||||
wiki.all_pages = wiki_pages
|
wiki.all_pages = wiki_pages
|
||||||
wiki.shelf = ctx.locals.get('data').wiki
|
|
||||||
ctx.theme.config.wiki = wiki
|
ctx.theme.config.wiki = wiki
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue