Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add blog root path config #225

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ base_info:
# Your blog website author name
author: Keep Team

# Your blog root path relative to your website
# The path is used by several links such as title and logo.
blog_root: /

# ---------------------------------------------------------------------------------------
# Theme style settings
# Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/style.html
Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const web_master = bi_author || hexo_author
<img src="https://img.shields.io/badge/Since-<%= since_date %>-<%= shields_color_list[0] %>?style=<%= shields_style %>">
</a>
<% if (web_master) { %>
<a class="shields-item" href="/">
<a class="shields-item" href="<%- theme.base_info.blog_root %>">
<img src="https://img.shields.io/badge/WebMaster-<%= web_master %>-<%= shields_color_list[1] %>?style=<%= shields_style %>">
</a>
<% } %>
Expand Down Expand Up @@ -67,7 +67,7 @@ const web_master = bi_author || hexo_author
<div class="copyright-info info-item <%= footer_style_type %>">
&copy;&nbsp;<% if (f_since) { %><span><%= f_since %></span>&nbsp;-&nbsp;<% } %><%= date(new Date(), 'YYYY') %>
<% if (web_master) { %>
&nbsp;<i class="fas fa-heart icon-animate"></i>&nbsp;&nbsp;<a href="/"><%= web_master %></a>
&nbsp;<i class="fas fa-heart icon-animate"></i>&nbsp;&nbsp;<a href="<%- theme.base_info.blog_root %>"><%= web_master %></a>
<% } %>
</div>

Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ const h_menu_nav_object = theme?.menu || { Home: '/', Archives: '/archives' }
<div class="border-box header-content<%- (s_fs_enable === true && is_home() && !page.prev) ? ' has-first-screen' : '' %>">
<div class="left border-box">
<% if (s_logo || bi_logo_img) { %>
<a class="logo-image border-box" href="/">
<a class="logo-image border-box" href="<%- theme.base_info.blog_root %>">
<%- image_tag(s_logo || bi_logo_img) %>
</a>
<% } %>
<a class="site-name border-box" href="/">
<a class="site-name border-box" href="<%- theme.base_info.blog_root %>">
<%= bi_title || config?.title || 'Keep Theme' %>
</a>
</div>
Expand Down