Skip to content

Commit

Permalink
Merge pull request #280 from XPoet/dev
Browse files Browse the repository at this point in the history
Release new version
  • Loading branch information
XPoet authored Nov 29, 2023
2 parents aee575c + 046c3f1 commit 2024e51
Show file tree
Hide file tree
Showing 23 changed files with 184 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://xpoet.cn/images/reward.png']
custom: ['https://xpoet.cn/post/0054d541d734/']
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ body:
I made sure I checked
我确认我已经检查过了
options:
- label: I am using Keep version `4.0.0` or later. (使用 Keep 4.0.0 或更高版本)
- label: I am using Keep version `4.0.2` or later. (使用 Keep `4.0.2` 或更高版本)
required: true
- label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn). (已阅读 [Hexo 故障处理页面](https://hexo.io/docs/troubleshooting) 和 [Keep 文档](https://keep-docs.xpoet.cn))
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ body:
I made sure I checked
我确认我已经检查过了
options:
- label: I am using Keep version `4.0.0` or later. (使用 Keep 4.0.0 或更高版本)
- label: I am using Keep version `4.0.2` or later. (使用 Keep `4.0.2` 或更高版本)
required: true
- label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn). (已阅读 [Hexo 故障处理页面](https://hexo.io/docs/troubleshooting) 和 [Keep 文档](https://keep-docs.xpoet.cn))
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ body:
I made sure I checked
我确认我已经检查过了
options:
- label: I am using Keep version `4.0.0` or later. (使用 Keep 4.0.0 或更高版本)
- label: I am using Keep version `4.0.2` or later. (使用 Keep `4.0.2` 或更高版本)
required: true
- label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn). (已阅读 [Hexo 故障处理页面](https://hexo.io/docs/troubleshooting) 和 [Keep 文档](https://keep-docs.xpoet.cn))
required: true
Expand Down
34 changes: 16 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<a title="Chinese" href="docs/README_zh-TW.md">繁體中文</a>
</div>

<a href="https://xpoet.cn"><img align="center" alt="Keep" src="https://xpoet.cn/images/keep-slogan.svg"></a>
<a href="https://xpoet.cn"><img align="center" alt="Keep" src="https://keep-docs.xpoet.cn/images/keep-slogan.svg"></a>

# hexo-theme-keep

Expand All @@ -32,15 +32,15 @@ If you're using Hexo 5.0 or later, the simplest way to install is through NPM:
```sh
# recommend

$ cd your-hexo
$ npm install hexo-theme-keep
cd your-hexo
npm install hexo-theme-keep
```

Or you can clone the entire repository:

```sh
$ cd your-hexo
$ git clone https://github.com/XPoet/hexo-theme-keep themes/keep
cd your-hexo
git clone https://github.com/XPoet/hexo-theme-keep --depth=1 themes/keep
```

After the installation, open Hexo config file and set `theme` variable to `keep`.
Expand All @@ -49,48 +49,46 @@ After the installation, open Hexo config file and set `theme` variable to `keep`
theme: keep
```
## :wrench: Usage
## :books: Documents
Please see the official documents of **Keep**.
- **[Keep official document](https://keep-docs.xpoet.cn/)**
- **[Keep theme configuration guide](https://keep-docs.xpoet.cn/basis/configuration-guide/base_info.html)**
- **[Keep theme advanced usage](https://keep-docs.xpoet.cn/advanced/set-language.html)**
It is not recommended to directly modify any files in the **Keep** theme. Because this may cause errors (e.g. merge conflicts), and the modified files may be discarded when upgrading the theme.
## :dart: Update
## :tada: Update
**Keep** releases new versions from time to time. You can update Keep by the following command.
**Keep** releases new versions from time to time. You can update **Keep** by the following command.
Install the latest version through NPM:
```sh
# recommend

$ cd your-hexo
$ npm install hexo-theme-keep@latest
cd your-hexo
npm install hexo-theme-keep@latest
```

Or update to the latest master branch:

```sh
$ cd themes/keep
$ git pull
cd themes/keep
git pull
```

## :art: Contributing

We welcome you to join the development of **Keep**. Please see [contributing guide](https://keep-docs.xpoet.cn/user-notice/contribution-guide.html).
It is not recommended to directly modify any files in the **Keep** theme. Because this may cause errors (e.g. merge conflicts), and the modified files may be discarded when upgrading the theme.

## :clapper: Contributors
## :art: Contributors

This project exists thanks to all the people who contribute.

<a href="https://github.com/XPoet/hexo-theme-keep/graphs/contributors">
<img src="https://contrib.rocks/image?repo=XPoet/hexo-theme-keep" />
</a>

We welcome you to join the development of **Keep**. Please see [contributing guide](https://keep-docs.xpoet.cn/user-notice/contribution-guide.html).

## :sparkling_heart: Thanks

**Keep** send special thanks to these great services that sponsor our core infrastructure:
Expand Down
28 changes: 13 additions & 15 deletions docs/README_zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div align="right">
语言:
语言
简体中文 |
<a title="English" href="../README.md">English</a> |
<a title="Chinese" href="README_zh-TW.md">繁體中文</a>
</div>
<a href="https://xpoet.cn"><img align="center" alt="Keep" src="https://xpoet.cn/images/keep-slogan.svg"></a>
<a href="https://xpoet.cn"><img align="center" alt="Keep" src="https://keep-docs.xpoet.cn/images/keep-slogan.svg"></a>

# hexo-theme-keep

Expand All @@ -26,20 +26,20 @@
## :rocket: 安装

如果你在使用 Hexo 5.0 或更高版本,最简单的安装方式是通过 NPM:
如果你使用 Hexo 5.0 或更高版本,最简单的安装方式是通过 NPM:

```sh
# 推荐

$ cd your-hexo
$ npm install hexo-theme-keep
cd your-hexo
npm install hexo-theme-keep
```

你也可以直接克隆整个仓库:

```sh
$ cd your-hexo
$ git clone https://github.com/XPoet/hexo-theme-keep --depth=1 themes/keep
cd your-hexo
git clone https://github.com/XPoet/hexo-theme-keep --depth=1 themes/keep
```

安装完成后,在 Hexo 配置文件中将 `theme` 设置为 `keep`
Expand All @@ -48,17 +48,15 @@ $ git clone https://github.com/XPoet/hexo-theme-keep --depth=1 themes/keep
theme: keep
```
## :wrench: 使用
## :books: 文档
请查看 **Keep** 官方文档:
- **[Keep 官方文档](https://keep-docs.xpoet.cn/)**
- **[Keep 主题配置指南](https://keep-docs.xpoet.cn/basis/configuration-guide/base_info.html)**
- **[Keep 主题进阶使用](https://keep-docs.xpoet.cn/advanced/set-language.html)**
不推荐直接修改 **Keep** 主题的文件。因为这可能导致错误(例如 git merge 冲突),并且在升级主题时修改的文件可能丢失。
## :dart: 更新
## :tada: 更新
**Keep** 不定期发布新版本,你可以通过如下命令更新 **Keep**。
Expand All @@ -78,18 +76,18 @@ $ cd themes/keep
$ git pull
```

## :art: 贡献
不推荐直接修改 **Keep** 主题的源文件。因为这可能导致错误(例如 git merge 冲突),并且在升级主题时修改的文件可能丢失。

我们欢迎你加入 **Keep** 的开发,贡献出你的一份力量。请看 [Keep 代码贡献指南](https://keep-docs.xpoet.cn/user-notice/contribution-guide.html)

## :clapper: 贡献者
## :art: 贡献者

这个项目的存在多亏了所有的贡献者。

<a href="https://github.com/XPoet/hexo-theme-keep/graphs/contributors">
<img src="https://contrib.rocks/image?repo=XPoet/hexo-theme-keep" />
</a>

我们欢迎你加入 **Keep** 的开发,贡献出你的一份力量。请看 [Keep 代码贡献指南](https://keep-docs.xpoet.cn/user-notice/contribution-guide.html)

## :sparkling_heart: 鸣谢

**Keep** 特别感谢这些支持我们核心基础设施的优质服务:
Expand Down
28 changes: 13 additions & 15 deletions docs/README_zh-TW.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div align="right">
語言:
語言
繁體中文 |
<a title="English" href="../README.md">English</a> |
<a title="Chinese" href="README_zh-CN.md">简体中文</a>
</div>

<a href="https://xpoet.cn"><img align="center" alt="Keep" src="https://xpoet.cn/images/keep-slogan.svg"></a>
<a href="https://xpoet.cn"><img align="center" alt="Keep" src="https://keep-docs.xpoet.cn/images/keep-slogan.svg"></a>

# hexo-theme-keep

Expand All @@ -27,20 +27,20 @@
## :rocket: 安装

如果你在使用 Hexo 5.0 或更高版本,最簡單的安裝方式是透過 NPM:
如果你使用 Hexo 5.0 或更高版本,最簡單的安裝方式是透過 NPM:

```sh
# 推薦

$ cd your-hexo
$ npm install hexo-theme-keep
cd your-hexo
npm install hexo-theme-keep
```

你也可以直接 clone 整個原始碼庫:

```sh
$ cd your-hexo
$ git clone https://github.com/XPoet/hexo-theme-keep --depth=1 themes/keep
cd your-hexo
git clone https://github.com/XPoet/hexo-theme-keep --depth=1 themes/keep
```

安裝完成後,在 Hexo 配置文件中將 `theme` 設定為 `keep`
Expand All @@ -49,17 +49,15 @@ $ git clone https://github.com/XPoet/hexo-theme-keep --depth=1 themes/keep
theme: keep
```
## :wrench: 使用
## :books: 文檔
請查看 **Keep** 官方文檔:
- **[Keep 官方文檔](https://keep-docs.xpoet.cn/)**
- **[Keep 主題配置指南](https://keep-docs.xpoet.cn/basis/configuration-guide/base_info.html)**
- **[Keep 主題進階使用](https://keep-docs.xpoet.cn/advanced/set-language.html)**
不推薦直接修改 **Keep** 主題的文件。因為這可能導致錯誤(例如 git merge 衝突),並且在更新主題時修改的文件可能丟失。
## :dart: 更新
## :tada: 更新
**Keep** 不定期發布新版本。你可以透過如下命令更新 **Keep**。
Expand All @@ -79,18 +77,18 @@ $ cd themes/keep
$ git pull
```

## :art: 貢獻

我們歡迎你加入 **Keep** 的開發,貢獻出你的一份力量。請看[Keep 原始碼貢獻指南](https://keep-docs.xpoet.cn/user-notice/contribution-guide.html)
不推薦直接修改 **Keep** 主題的文件。因為這可能導致錯誤(例如 git merge 衝突),並且在更新主題時修改的文件可能丟失。

## :clapper: 貢獻者
## :art: 貢獻者

這個項目的存在多虧了所有的貢獻者。

<a href="https://github.com/XPoet/hexo-theme-keep/graphs/contributors">
<img src="https://contrib.rocks/image?repo=XPoet/hexo-theme-keep" />
</a>

我們歡迎你加入 **Keep** 的開發,貢獻出你的一份力量。請看 [Keep 原始碼貢獻指南](https://keep-docs.xpoet.cn/user-notice/contribution-guide.html)

## :sparkling_heart: 銘謝

**Keep** 特别感謝這些支持我們核心基本設施的優質服務:
Expand Down
13 changes: 7 additions & 6 deletions layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
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="<%- url_for('/') %>"><%= web_master %></a>
<% } %>
</div>
Expand All @@ -87,16 +87,17 @@ const web_master = bi_author || hexo_author
<% } %>
<% if (f_site_deploy?.enable === true && f_site_deploy?.provider) { %>
<% const deploy_provider_img_tag = image_tag('/images/deploy-provider/' + f_site_deploy?.provider + '.png') %>
<div class="deploy-info info-item <%= footer_style_type %>">
<% if (f_site_deploy?.url) { %>
<a target="_blank" rel="nofollow" href="<%= f_site_deploy?.url %>">
<% } %>
<a target="_blank" rel="nofollow" href="<%= f_site_deploy?.url %>">
<% } %>
<%- __(
'footer.deploy',
'<span class="tooltip" data-tooltip-content="' + __('footer.deploy_provider.' + f_site_deploy?.provider) + '"><img src="/images/deploy-provider/' + f_site_deploy?.provider + '.png"></span>'
'<span class="tooltip" data-tooltip-content="' + __('footer.deploy_provider.' + f_site_deploy?.provider) + '">' + deploy_provider_img_tag + '</span>'
) %>
<% if (f_site_deploy?.url) { %>
</a>
<% if (f_site_deploy?.url) { %>
</a>
<% } %>
</div>
<% } %>
Expand Down
30 changes: 21 additions & 9 deletions layout/_partial/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,38 @@
const { title: bi_title, logo: bi_logo } = theme?.base_info || {}
const { enable: s_fs_enable } = theme?.first_screen || {}
const { enable: local_search_enable } = theme?.local_search || {}
const h_menu_nav_object = theme?.menu || { Home: '/', Archives: '/archives' }
const h_menu_nav_object = theme?.menu || { Archives: '/archives' }
delete h_menu_nav_object['home']
delete h_menu_nav_object['Home']
delete h_menu_nav_object['HOME']
%>
<header class="header-wrapper<%= s_fs_enable === true && is_home() ? ' transparent-1' : '' %>">
<div class="border-box header-content<%- (s_fs_enable === true && is_home() && !page.prev) ? ' has-first-screen' : '' %>">
<div class="left border-box">
<% if (bi_logo) { %>
<a class="logo-image border-box" href="/">
<a class="logo-image border-box" href="<%- url_for('/') %>">
<%- image_tag(bi_logo) %>
</a>
<% } %>
<a class="site-name border-box" href="/">
<a class="site-name border-box" href="<%- url_for('/') %>">
<%= bi_title || config?.title || 'Keep Theme' %>
</a>
</div>
<div class="right border-box">
<div class="pc">
<ul class="menu-list">
<li class="menu-item">
<a class="<%- is_home() ? 'active' : '' %>"
href="<%- url_for('/') %>"
><%= __('home').toUpperCase() %></a>
</li>
<% for (const i in h_menu_nav_object) { %>
<li class="menu-item">
<a class="<%- isInHomePaging(page.path, h_menu_nav_object[i]) ? 'active' : is_current(h_menu_nav_object[i]) ? 'active' : '' %>"
<a class="<%- is_current(h_menu_nav_object[i]) ? 'active' : '' %>"
href="<%- url_for(h_menu_nav_object[i]) %>"
>
<%= __(i.toLowerCase()).toUpperCase() %>
</a>
><%= __(i.toLowerCase()).toUpperCase() %></a>
</li>
<% } %>
<% if (local_search_enable === true) { %>
Expand All @@ -50,10 +56,16 @@ const h_menu_nav_object = theme?.menu || { Home: '/', Archives: '/archives' }
<div class="header-drawer">
<ul class="drawer-menu-list">
<li class="drawer-menu-item flex-center">
<a class="<%- is_home() ? 'active' : '' %>"
href="<%- url_for('/') %>"
><%= __('home').toUpperCase() %></a>
</li>
<% for (let i in h_menu_nav_object) { %>
<li class="drawer-menu-item flex-center">
<a class="<%- isInHomePaging(page.path, h_menu_nav_object[i]) ? 'active' : is_current(h_menu_nav_object[i]) ? 'active' : '' %>"
href="<%- url_for(h_menu_nav_object[i]) %>"><%= __(i.toLowerCase()).toUpperCase() %></a>
<a class="<%- is_current(h_menu_nav_object[i]) ? 'active' : '' %>"
href="<%- url_for(h_menu_nav_object[i]) %>"
><%= __(i.toLowerCase()).toUpperCase() %></a>
</li>
<% } %>
</ul>
Expand Down
4 changes: 3 additions & 1 deletion layout/home-content.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<% if (theme?.home?.announcement) { %>
<div class="website-announcement border-box">
<i class="icon left fa-solid fa-bullhorn"></i>
<span class="announcement border-box text-ellipsis"><%= theme?.home?.announcement %></span>
<div class="announcement border-box text-ellipsis">
<%- markdown(theme?.home?.announcement) %>
</div>
<i class="icon right close fa-solid fa-close"></i>
</div>
<% } %>
Expand Down
File renamed without changes.
Loading

0 comments on commit 2024e51

Please sign in to comment.