diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs
index 61ef8cb..1be6b21 100755
--- a/layout/_partial/head.ejs
+++ b/layout/_partial/head.ejs
@@ -13,16 +13,14 @@ function generate_title() {
}
} else {
if (page.title) {
- return page.title;
+ return page.title + ' - ' + config.title;
} else if (page.category) {
return __('btn.category') + __('symbol.colon') + page.category + ' - ' + config.title;
} else if (page.tag) {
return __('btn.tag') + __('symbol.colon') + page.tag + ' - ' + config.title;
- } else {
- return config.title;
}
}
- return '';
+ return config.title;
}
function generate_description() {
if (theme.open_graph && theme.open_graph.enable) {
diff --git a/layout/_partial/sidebar/header.ejs b/layout/_partial/sidebar/header.ejs
index 6b51076..729d672 100644
--- a/layout/_partial/sidebar/header.ejs
+++ b/layout/_partial/sidebar/header.ejs
@@ -1,20 +1,55 @@
<%
+var proj;
+if (page.layout === 'wiki' && page.wiki) {
+ proj = theme.wiki.projects[page.wiki];
+}
+function layoutTitle(main, url, sub) {
+ var el = '';
+ el += '';
+ el += '' + main + '
';
+ if (sub) {
+ let arr = sub.split('|');
+ if (arr.length > 1) {
+ el += '' + arr[0].trim() + '
';
+ el += '' + arr[1].trim() + '
';
+ } else if (arr.length > 0) {
+ el += '' + arr[0] + '
';
+ }
+ }
+ el += '';
+ return el;
+}
+
function layoutDiv() {
var el = '';
+ if (page.layout == 'wiki' && page.menu_id == 'wiki') {
+ return el;
+ }
el += '';
- el += partial('logo');
- if (where != 'main') {
- if (page.layout === 'wiki' && page.wiki) {
- if (page.menu_id !== 'wiki') {
- el += partial('menu', {where: where});
- }
- } else {
- el += partial('menu', {where: where});
+
+ el += '';
+
+ if (where != 'main') {
+ el += partial('menu', {where: where});
}
el += '';
return el;
diff --git a/layout/_partial/sidebar/index.ejs b/layout/_partial/sidebar/index.ejs
index c01377d..558d6e7 100755
--- a/layout/_partial/sidebar/index.ejs
+++ b/layout/_partial/sidebar/index.ejs
@@ -1,4 +1,8 @@
<%
+var proj;
+if (page.layout === 'wiki' && page.wiki) {
+ proj = theme.wiki.projects[page.wiki];
+}
// 默认组件
if (page.sidebar == undefined) {
if (page.layout == 'post' && page.content) {
@@ -23,10 +27,50 @@ if (page.sidebar == undefined) {
if (typeof page.sidebar == 'string') {
page.sidebar = page.sidebar.replace(/ /g, '').split(',');
}
-
+function layoutTitle(main, url, sub) {
+ var el = '';
+ el += '';
+ el += '' + main + '
';
+ if (sub) {
+ let arr = sub.split('|');
+ if (arr.length > 1) {
+ el += '' + arr[0].trim() + '
';
+ el += '' + arr[1].trim() + '
';
+ } else if (arr.length > 0) {
+ el += '' + arr[0] + '
';
+ }
+ }
+ el += '';
+ return el;
+}
function layoutWidgets() {
var el = '';
el += '