Skip to content

Commit

Permalink
Merge pull request #81 from EvanNotFound/dev
Browse files Browse the repository at this point in the history
v1.1.4
  • Loading branch information
EvanNotFound authored Mar 2, 2023
2 parents da7e3d9 + 82b2647 commit 9453b8a
Show file tree
Hide file tree
Showing 17 changed files with 815 additions and 13 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,19 @@ If you are also using Redefine, please go to [Redefine Theme Showcase](https://r

## ⛰️ Some functions

- [Note Module](https://redefine-docs.ohevan.com/docs/advanced/plugins/note-module)
- [Note Module](https://redefine-docs.ohevan.com/docs/advanced/writing-modules/note-module)
- [Friend Link Page](https://redefine-docs.ohevan.com/docs/advanced/friend-link)
- [Mathjax Support](https://redefine-docs.ohevan.com/docs/advanced/plugins/mathjax)
- [Mathjax Support](https://redefine-docs.ohevan.com/docs/advanced/writing-modules/mathjax)
- Code block language display
- Light/Dark mode switching
- [Font Awesome 6.1.0 Pro](https://redefine-docs.ohevan.com/docs/configuration-guide/fontawesome) (contains different styles like Duotone/Regular/Thin)
- [Drop-down menu](https://redefine-docs.ohevan.com/docs/configuration-guide/menu)
- [Customizable footer](https://redefine-docs.ohevan.com/docs/configuration-guide/footer)
- [Site Uptime Display](https://redefine-docs.ohevan.com/docs/configuration-guide/footer)
- [Article Header Image](https://redefine-docs.ohevan.com/docs/advanced/home-contents/thumbnail)
- [Mermaid JS support](https://redefine-docs.ohevan.com/docs/advanced/plugins/mermaid)
- [Mermaid JS support](https://redefine-docs.ohevan.com/docs/advanced/writing-modules/mermaid)
- SEO friendly
- [Aplayer support](https://redefine-docs.ohevan.com/docs/advanced/theme-plugins/aplayer)



Expand Down
7 changes: 4 additions & 3 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,19 @@

## ⛰️ 部分功能

- [笔记模块](https://redefine-docs.ohevan.com/docs/advanced/plugins/note-module)
- [笔记模块](https://redefine-docs.ohevan.com/docs/advanced/writing-modules/note-module)
- [友链样式](https://redefine-docs.ohevan.com/docs/advanced/friend-link)
- [数学公式](https://redefine-docs.ohevan.com/docs/advanced/plugins/mathjax)
- [数学公式](https://redefine-docs.ohevan.com/docs/advanced/writing-modules/mathjax)
- 代码块语言显示
- Light/Dark 模式切换
- [Font Awesome 6.1.0 Pro](https://redefine-docs.ohevan.com/docs/configuration-guide/fontawesome)(包含 Duotone/Regular/Thin 等不同样式)
- [下拉菜单](https://redefine-docs.ohevan.com/docs/configuration-guide/menu)
- [可自定义页脚](https://redefine-docs.ohevan.com/docs/configuration-guide/footer)
- [网站运行时间显示](https://redefine-docs.ohevan.com/docs/configuration-guide/footer)
- [文章头图](https://redefine-docs.ohevan.com/docs/advanced/home-contents/thumbnail)
- [Mermaid JS 支持](https://redefine-docs.ohevan.com/docs/advanced/plugins/mermaid)
- [Mermaid JS 支持](https://redefine-docs.ohevan.com/docs/advanced/writing-modules/mermaid)
- SEO 友好
- [Aplayer 音乐播放器支持](https://redefine-docs.ohevan.com/docs/advanced/theme-plugins/aplayer)

## ☁️ 安装

Expand Down
7 changes: 4 additions & 3 deletions README_zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,19 @@

## ⛰️ 部分功能

- [筆記模塊](https://redefine-docs.ohevan.com/docs/advanced/plugins/note-module)
- [筆記模塊](https://redefine-docs.ohevan.com/docs/advanced/writing-modules/note-module)
- [友鏈樣式](https://redefine-docs.ohevan.com/docs/advanced/friend-link)
- [數學公式](https://redefine-docs.ohevan.com/docs/advanced/plugins/mathjax)
- [數學公式](https://redefine-docs.ohevan.com/docs/advanced/writing-modules/mathjax)
- 代碼塊語言顯示
- Light/Dark 模式切換
- [Font Awesome 6.1.0 Pro](https://redefine-docs.ohevan.com/docs/configuration-guide/fontawesome)(包含 Duotone/Regular/Thin 等不同樣式)
- [下拉菜單](https://redefine-docs.ohevan.com/docs/configuration-guide/menu)
- [可自定義頁腳](https://redefine-docs.ohevan.com/docs/configuration-guide/footer)
- [網站運行時間顯示](https://redefine-docs.ohevan.com/docs/configuration-guide/footer)
- [文章頭圖](https://redefine-docs.ohevan.com/docs/advanced/home-contents/thumbnail)
- [Mermaid JS 支持](https://redefine-docs.ohevan.com/docs/advanced/plugins/mermaid)
- [Mermaid JS 支持](https://redefine-docs.ohevan.com/docs/advanced/writing-modules/mermaid)
- SEO 友好
- [Aplayer 音乐播放器支持](https://redefine-docs.ohevan.com/docs/advanced/theme-plugins/aplayer)

## ☁️ 安裝

Expand Down
19 changes: 18 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,26 @@ inject:
-
-

# ---------------------------------------------------------------------------------------
# Theme plugins
# ---------------------------------------------------------------------------------------
plugins:
aplayer: # APlayer (fixed version)
enable: false
audio:
- name: # audio name
artist: # audio artist
url: # audio url
cover: # audio cover url
- name:
artist:
url:
cover:


# ---------------------------------------------------------------------------------------
# Redefine Theme version (Please dont modify it)
# Please go to github to update the latest version frequently
# Github: https://github.com/EvanNotFound/hexo-theme-redefine
# ---------------------------------------------------------------------------------------
version: 1.1.3
version: 1.1.4
5 changes: 5 additions & 0 deletions layout/_partials/components/aplayer.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="aplayer"></div>
<% if (theme.plugins.aplayer.enable) { %>
<%- __js('js/libs/APlayer.min.js') %>
<%- __js('js/plugins/aplayer.js') %>
<% } %>
2 changes: 2 additions & 0 deletions layout/_partials/scripts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<%- __css('assets/odometer-theme-minimal.css') %>
<% } %>



<div class="post-scripts<%= theme.pjax.enable === true ? ' pjax' : '' %>">
<% if (theme.toc.enable && is_post()) { %>
<%- __js([
Expand Down
3 changes: 3 additions & 0 deletions layout/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
<body>
<%- body %>
<%- partial('_partials/scripts') %>
<% if (theme.plugins.aplayer.enable) { %>
<%- partial('_partials/components/aplayer') %>
<% } %>
</body>
</html>
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-redefine",
"version": "1.1.3",
"version": "1.1.4",
"private": false,
"description": "Redefine your writing with modern style and various functionality in 'Redefine' Hexo Theme.",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions scripts/helpers/export-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ hexo.extend.helper.register('export_config', function () {
version: theme.version,
friend_links: theme.friend_links,
home_article: theme.home_article,
plugins: theme.plugins,
}

return `<script id="hexo-configurations">
Expand Down
4 changes: 2 additions & 2 deletions scripts/modules/folding.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function postFolding(args, content) {
title = args[0].trim();
}
if (style != undefined) {
return `<details class="${style}"><summary><i class="fa-solid fa-chevron-right"></i>&nbsp&nbsp&nbsp&nbsp${title} </summary>
return `<details class="${style}"><summary><i class="fa-solid fa-chevron-right"></i>${title} </summary>
<div class='content'>
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
</div>
</details>`;
}
return `<details><summary><i class="fa-solid fa-chevron-right"></i>&nbsp&nbsp&nbsp${title} </summary>
return `<details><summary><i class="fa-solid fa-chevron-right"></i>${title} </summary>
<div class='content'>
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
</div>
Expand Down
Loading

0 comments on commit 9453b8a

Please sign in to comment.