Skip to content

Commit 42f3cda

Browse files
committed
修复主页显示子页面的bug
1 parent 7afe4e1 commit 42f3cda

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

layout/index.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<% const isChildPage = page.type === 'child' %>
2-
<% const setting = isChildPage ? Object.assign(theme, page) : theme %>
2+
<% const setting = isChildPage ? Object.assign({}, theme, page) : theme %>
33
<%# console.log(page.path) %>
44
<body class="page-body">
55
<div class="page-container">

layout/layout.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html>
22
<html lang="<%= config.language %>">
3-
<% const setting = page ? Object.assign(theme, page) : theme %>
3+
<% const setting = page ? Object.assign({}, theme, page) : theme %>
44
<head>
55
<%- partial('common/head', {setting:setting}) %>
66
</head>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hexo-theme-webstack",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "A hexo theme based on webstack.",
55
"keywords": [
66
"hexo",

0 commit comments

Comments
 (0)