Skip to content

Commit

Permalink
Merge pull request #59 from EvanNotFound/dev
Browse files Browse the repository at this point in the history
v1.1.1
  • Loading branch information
EvanNotFound authored Feb 13, 2023
2 parents 7547b1a + e1aea35 commit e38110c
Show file tree
Hide file tree
Showing 35 changed files with 435 additions and 34 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<a title="Chinese" href="README_zh-TW.md">繁中</a>
</div>

<a href="https://redefine.ohevan.com"><img align="center" src="https://user-images.githubusercontent.com/68590232/197350938-3d27f054-04e6-4e7a-8bce-94666b56e822.png" alt="Redefine"></a>
<a href="https://redefine.ohevan.com"><img align="center" src="https://user-images.githubusercontent.com/68590232/218364072-45dd3a00-ae5e-4e25-8823-cea59fc73e36.png" alt="Redefine"></a>



Expand All @@ -26,7 +26,7 @@

## 🌐 Online Demo

- [Anonymous Land](https://ohevan.com)
- [EvanNotFound's Blog](https://ohevan.com)
- [Theme Redefine Demo](https://redefine.ohevan.com)

## ⛰️ Some functions
Expand Down
5 changes: 2 additions & 3 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<a title="Chinese" href="README_zh-TW.md">繁中</a>
</div>

<a href="https://redefine.ohevan.com"><img align="center" src="https://user-images.githubusercontent.com/68590232/197350938-3d27f054-04e6-4e7a-8bce-94666b56e822.png" alt="Redefine"></a>

<a href="https://redefine.ohevan.com"><img align="center" src="https://user-images.githubusercontent.com/68590232/218364072-45dd3a00-ae5e-4e25-8823-cea59fc73e36.png" alt="Redefine"></a>


# hexo-theme-redefine
Expand All @@ -26,7 +25,7 @@

## 🌐 在线演示站

- [Anonymous Land](https://ohevan.com)
- [EvanNotFound's Blog](https://ohevan.com)
- [Theme Redefine Demo](https://redefine.ohevan.com)

## ⛰️ 部分功能
Expand Down
4 changes: 2 additions & 2 deletions README_zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<a title="Chinese" href="README_zh-CN.md">简中</a>
</div>

<a href="https://redefine.ohevan.com"><img align="center" src="https://user-images.githubusercontent.com/68590232/197350938-3d27f054-04e6-4e7a-8bce-94666b56e822.png" alt="Redefine"></a>
<a href="https://redefine.ohevan.com"><img align="center" src="https://user-images.githubusercontent.com/68590232/218364072-45dd3a00-ae5e-4e25-8823-cea59fc73e36.png" alt="Redefine"></a>



Expand All @@ -27,7 +27,7 @@

## 🌐 在線演示站

- [Anonymous Land](https://ohevan.com)
- [EvanNotFound's Blog](https://ohevan.com)
- [Theme Redefine Demo](https://redefine.ohevan.com)

## ⛰️ 部分功能
Expand Down
23 changes: 21 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ style:
light: "#fff" # first screen title color (light mode)
dark: "#d1d1b6" # first screen title color (dark mode)
description: Theme Redefine # the title in the middle of the first screen. HTML supported (e.g. svg html code of your logo)
custom_font: # custom font for the first screen
enable: false
font_family: # the font family name of the url below
font_url: # The url to the font file

# Scroll style settings
scroll:
Expand Down Expand Up @@ -90,7 +94,7 @@ menu: #you can customize, i18n files are in the theme's languages folder. fa-reg
# submenus:
# Me: /about
# Github: https://github.com/EvanNotFound/hexo-theme-redefine
# Blog: https://www.evanluo.top
# Blog: https://ohevan.com
# Friends: /friends
# Links:
# icon: fa-regular fa-link
Expand Down Expand Up @@ -243,6 +247,21 @@ cdn:
pjax:
enable: true

# ---------------------------------------------------------------------------------------
# Article recommendation (transplant from Volantis)
# ---------------------------------------------------------------------------------------
recommended_article: # 文章推荐,需要 npm install nodejieba
enable: false
title: 推荐阅读
icon: fa-solid fa-bookmark
max_count: 3
placeholder_img: https://evan.beee.top/img/wallhaven-wqery6-light.webp
# 不展示文章推荐:
# front-matter 使用 skip_recommended_article: true 关闭
# 不在以下文件夹文章中展示文章推荐 根目录是source/
skip_dirs:
- wiki/

# ---------------------------------------------------------------------------------------
# Fontawesome
# ---------------------------------------------------------------------------------------
Expand Down Expand Up @@ -277,4 +296,4 @@ inject:
# Please go to github to update the latest version frequently
# Github: https://github.com/EvanNotFound/hexo-theme-redefine
# ---------------------------------------------------------------------------------------
version: 1.1.0
version: 1.1.1
8 changes: 8 additions & 0 deletions layout/_partials/components/404-template.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="nf-container">
<div class="nf-text">
<h1>404 Page Not Found</h1>
</div>
<div class="nf-button">
<a href="/" class="button large center"><i class="fa-regular fa-house"></i> Go Back</a>
</div>
</div>
4 changes: 3 additions & 1 deletion layout/_partials/components/first-screen.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="first-screen-container flex-center">
<div class="content flex-center">
<div class="description fade-in-down-animation">
<div class="description fade-in-down-animation" <% if (theme.style.first_screen.custom_font.enable) { %>
style="font-family: '<%- theme.style.first_screen.custom_font.font_family %>', sans-serif; !important;"
<% } %>>
<%- theme.style.first_screen.description || config.description %>
</div>
<% if (theme.social_contact.enable) { %>
Expand Down
38 changes: 28 additions & 10 deletions layout/_partials/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
<!--- Seo Part-->
<%- generate_seo(theme, page) %>
<%- autoCanonical(config, page) %>
<meta name="robots" content="index,follow">
<meta name="googlebot" content="index,follow">
<meta name="revisit-after" content="1 days">
<meta property="og:type" content="article">
<meta property="og:title" content="<%= page.title || config.title || 'Redefine Theme' %>">
<meta property="og:description" content="<%= page.description || config.description || 'Hexo Theme Redefine' %>">
<meta property="og:url" content="<%= config.url + page.path %>">
<meta property="og:image" content="<%= theme.style.favicon %>">
<meta property="og:site_name" content="<%= theme.base_info.title || config.title || 'Redefine Theme' %>">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="<%= page.title || config.title || 'Redefine Theme' %>">
<meta name="twitter:description" content="<%= page.description || config.description || 'Hexo Theme Redefine' %>">
<meta name="twitter:image" content="<%= theme.style.favicon %>">
<!--- Icon Part-->
<link rel="icon" type="image/png" href="<%= theme.style.favicon %>" sizes="192x192">
<link rel="apple-touch-icon" sizes="180x180" href="<%= theme.style.favicon %>">
Expand All @@ -32,12 +45,15 @@
%>
<title>
<% if (title) { %>
<%= title %> |
<%= title %> -
<% } %>
<%= theme.base_info.title || config.title || 'Redefine Theme' %>
</title>
<%- css('css/style') %>
<%- __css('css/fonts.css') %>
<%- __css('assets/fonts.css') %>
<% if (theme.style.first_screen.custom_font.enable) { %>
<link href="<%- theme.style.first_screen.custom_font.font_url %>" rel="stylesheet">
<% } %>
<% if (theme.inject.enable == true) { %>
<% for (let i in theme.inject.head) { %>
<% if (theme.inject.head[i] !== null){ %>
Expand All @@ -47,21 +63,23 @@
<%- theme.inject.head[i] %>
<% } }%>
<% } }%>
<link rel="preconnect" href="https://evan.beee.top" crossorigin>
<% if (theme.cdn.enable == true) { %>
<link rel="preconnect" href="https://evan.beee.top" crossorigin>
<% } %>
<%- export_config() %>

<%- __css('css/fontawesome.min.css') %>
<%- __css('css/brands.min.css') %>
<%- __css('css/solid.min.css') %>
<%- __css('css/regular.min.css') %>
<%- __css('fontawesome/fontawesome.min.css') %>
<%- __css('fontawesome/brands.min.css') %>
<%- __css('fontawesome/solid.min.css') %>
<%- __css('fontawesome/regular.min.css') %>
<% if (theme.fontawesome.thin == true) { %>
<%- __css('css/thin.min.css') %>
<%- __css('fontawesome/thin.min.css') %>
<% } %>
<% if (theme.fontawesome.light == true) { %>
<%- __css('css/light.min.css') %>
<%- __css('fontawesome/light.min.css') %>
<% } %>
<% if (theme.fontawesome.duotone == true) { %>
<%- __css('css/duotone.min.css') %>
<%- __css('fontawesome/duotone.min.css') %>
<% } %>
</head>

2 changes: 1 addition & 1 deletion layout/_partials/scripts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<% if (theme.footer.runtime) { %>
<%- __js('js/tools/runtime.js') %>
<%- __js('js/layouts/odometer.min.js') %>
<%- __css('css/odometer-theme-minimal.css') %>
<%- __css('assets/odometer-theme-minimal.css') %>
<% } %>

<div class="post-scripts<%= theme.pjax.enable === true ? ' pjax' : '' %>">
Expand Down
3 changes: 3 additions & 0 deletions layout/article-content.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
</ul>
<% } %>

<%- 文章推荐生成器(page) %>

<% if (page.prev || page.next) { %>
<div class="article-nav">
<% if (page.prev) { %>
Expand Down Expand Up @@ -112,6 +114,7 @@
</div>
<% } %>


<% if (theme.comment.enable === true && theme.comment.hasOwnProperty(theme.comment.use)) { %>
<div class="comment-container">
<%- partial('_partials/comments/comment') %>
Expand Down
3 changes: 3 additions & 0 deletions layout/page.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
<% } else if (page.title === 'tag' || page.title === 'tags') { %>
<%- partial('_partials/tools/tagcloud') %>
<% } else if (page.title === 'Page Not Found' || page.title === 'tags') { %>
<%- partial('_partials/components/404-template') %>
<% } else { %>
<%- partial('_partials/page-template') %>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "hexo-theme-redefine",
"version": "1.1.0",
"version": "1.1.1",
"private": false,
"description": "\"Redefine\" hexo theme is a simple & fast & pure theme, but with no compromise.",
"description": "Redefine your writing with modern style and various functionality in 'Redefine' Hexo Theme.",
"scripts": {
"npm:publish": "npm publish",
"format": "prettier --write ./source/js/*.js ./scripts",
Expand Down
6 changes: 3 additions & 3 deletions scripts/events/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
hexo.extend.generator.register('404', function(locals){
return {
path: '404.html',
layout: ['page'],
layout: '404',
data: {
type: '404',
top_img: false
title: 'Page Not Found',
page: locals.pages.findOne({path: '404.html'})
}
}
});
4 changes: 2 additions & 2 deletions scripts/events/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ hexo.on("ready", () => {
res.on('end', () => {
const jsonData = JSON.parse(data);
hexo.log.info(
`\n===================================================================\n ______ __ __ ______ __ __ ______ \r\n \/\\__ _\/\\ \\_\\ \\\/\\ ___\\\/\\ \"-.\/ \\\/\\ ___\\ \r\n \\\/_\/\\ \\\\ \\ __ \\ \\ __\\\\ \\ \\-.\/\\ \\ \\ __\\ \r\n \\ \\_\\\\ \\_\\ \\_\\ \\_____\\ \\_\\ \\ \\_\\ \\_____\\ \r\n \\\/_\/ \\\/_\/\\\/_\/\\\/_____\/\\\/_\/ \\\/_\/\\\/_____\/ \r\n \r\n ______ ______ _____ ______ ______ __ __ __ ______ \r\n\/\\ == \\\/\\ ___\\\/\\ __-.\/\\ ___\\\/\\ ___\/\\ \\\/\\ \"-.\\ \\\/\\ ___\\ \r\n\\ \\ __<\\ \\ __\\\\ \\ \\\/\\ \\ \\ __\\\\ \\ __\\ \\ \\ \\ \\-. \\ \\ __\\ \r\n \\ \\_\\ \\_\\ \\_____\\ \\____-\\ \\_____\\ \\_\\ \\ \\_\\ \\_\\\\\"\\_\\ \\_____\\ \r\n \\\/_\/ \/_\/\\\/_____\/\\\/____\/ \\\/_____\/\\\/_\/ \\\/_\/\\\/_\/ \\\/_\/\\\/_____\/\r\n \r\n Github: https:\/\/github.com\/EvanNotFound\/hexo-theme-redefine\n current verison is v${version},latest version is v${jsonData["dist-tags"].latest}\n===================================================================`
`\n===================================================================\n ______ __ __ ______ __ __ ______ \r\n \/\\__ _\/\\ \\_\\ \\\/\\ ___\\\/\\ \"-.\/ \\\/\\ ___\\ \r\n \\\/_\/\\ \\\\ \\ __ \\ \\ __\\\\ \\ \\-.\/\\ \\ \\ __\\ \r\n \\ \\_\\\\ \\_\\ \\_\\ \\_____\\ \\_\\ \\ \\_\\ \\_____\\ \r\n \\\/_\/ \\\/_\/\\\/_\/\\\/_____\/\\\/_\/ \\\/_\/\\\/_____\/ \r\n \r\n ______ ______ _____ ______ ______ __ __ __ ______ \r\n\/\\ == \\\/\\ ___\\\/\\ __-.\/\\ ___\\\/\\ ___\/\\ \\\/\\ \"-.\\ \\\/\\ ___\\ \r\n\\ \\ __<\\ \\ __\\\\ \\ \\\/\\ \\ \\ __\\\\ \\ __\\ \\ \\ \\ \\-. \\ \\ __\\ \r\n \\ \\_\\ \\_\\ \\_____\\ \\____-\\ \\_____\\ \\_\\ \\ \\_\\ \\_\\\\\"\\_\\ \\_____\\ \r\n \\\/_\/ \/_\/\\\/_____\/\\\/____\/ \\\/_____\/\\\/_\/ \\\/_\/\\\/_\/ \\\/_\/\\\/_____\/\r\n \r\n Github: https:\/\/github.com\/EvanNotFound\/hexo-theme-redefine\n current version is v${version},latest version is v${jsonData["dist-tags"].latest}\n===================================================================`
);
if (jsonData["dist-tags"].latest !== version) {
console.log(
Expand All @@ -33,7 +33,7 @@ hexo.on("ready", () => {
}).on('error', (error) => {
console.log(`Error: Failed to fetch package information. ${error.message}`);
hexo.log.info(
`\n===================================================================\n ______ __ __ ______ __ __ ______ \r\n \/\\__ _\/\\ \\_\\ \\\/\\ ___\\\/\\ \"-.\/ \\\/\\ ___\\ \r\n \\\/_\/\\ \\\\ \\ __ \\ \\ __\\\\ \\ \\-.\/\\ \\ \\ __\\ \r\n \\ \\_\\\\ \\_\\ \\_\\ \\_____\\ \\_\\ \\ \\_\\ \\_____\\ \r\n \\\/_\/ \\\/_\/\\\/_\/\\\/_____\/\\\/_\/ \\\/_\/\\\/_____\/ \r\n \r\n ______ ______ _____ ______ ______ __ __ __ ______ \r\n\/\\ == \\\/\\ ___\\\/\\ __-.\/\\ ___\\\/\\ ___\/\\ \\\/\\ \"-.\\ \\\/\\ ___\\ \r\n\\ \\ __<\\ \\ __\\\\ \\ \\\/\\ \\ \\ __\\\\ \\ __\\ \\ \\ \\ \\-. \\ \\ __\\ \r\n \\ \\_\\ \\_\\ \\_____\\ \\____-\\ \\_____\\ \\_\\ \\ \\_\\ \\_\\\\\"\\_\\ \\_____\\ \r\n \\\/_\/ \/_\/\\\/_____\/\\\/____\/ \\\/_____\/\\\/_\/ \\\/_\/\\\/_\/ \\\/_\/\\\/_____\/\r\n \r\n Github: https:\/\/github.com\/EvanNotFound\/hexo-theme-redefine\n current verison is v${version},check latest version failed\n===================================================================`
`\n===================================================================\n ______ __ __ ______ __ __ ______ \r\n \/\\__ _\/\\ \\_\\ \\\/\\ ___\\\/\\ \"-.\/ \\\/\\ ___\\ \r\n \\\/_\/\\ \\\\ \\ __ \\ \\ __\\\\ \\ \\-.\/\\ \\ \\ __\\ \r\n \\ \\_\\\\ \\_\\ \\_\\ \\_____\\ \\_\\ \\ \\_\\ \\_____\\ \r\n \\\/_\/ \\\/_\/\\\/_\/\\\/_____\/\\\/_\/ \\\/_\/\\\/_____\/ \r\n \r\n ______ ______ _____ ______ ______ __ __ __ ______ \r\n\/\\ == \\\/\\ ___\\\/\\ __-.\/\\ ___\\\/\\ ___\/\\ \\\/\\ \"-.\\ \\\/\\ ___\\ \r\n\\ \\ __<\\ \\ __\\\\ \\ \\\/\\ \\ \\ __\\\\ \\ __\\ \\ \\ \\ \\-. \\ \\ __\\ \r\n \\ \\_\\ \\_\\ \\_____\\ \\____-\\ \\_____\\ \\_\\ \\ \\_\\ \\_\\\\\"\\_\\ \\_____\\ \r\n \\\/_\/ \/_\/\\\/_____\/\\\/____\/ \\\/_____\/\\\/_\/ \\\/_\/\\\/_\/ \\\/_\/\\\/_____\/\r\n \r\n Github: https:\/\/github.com\/EvanNotFound\/hexo-theme-redefine\n current version is v${version},check latest version failed\n===================================================================`
);

// continue with code execution here
Expand Down
Loading

0 comments on commit e38110c

Please sign in to comment.