Skip to content

Commit

Permalink
修复主页显示子页面的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
HCLonely committed Apr 25, 2021
1 parent 7afe4e1 commit 42f3cda
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion layout/index.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% const isChildPage = page.type === 'child' %>
<% const setting = isChildPage ? Object.assign(theme, page) : theme %>
<% const setting = isChildPage ? Object.assign({}, theme, page) : theme %>
<%# console.log(page.path) %>
<body class="page-body">
<div class="page-container">
Expand Down
2 changes: 1 addition & 1 deletion layout/layout.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="<%= config.language %>">
<% const setting = page ? Object.assign(theme, page) : theme %>
<% const setting = page ? Object.assign({}, theme, page) : theme %>
<head>
<%- partial('common/head', {setting:setting}) %>
</head>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-webstack",
"version": "2.0.3",
"version": "2.0.4",
"description": "A hexo theme based on webstack.",
"keywords": [
"hexo",
Expand Down

0 comments on commit 42f3cda

Please sign in to comment.