Skip to content

A simple black/white hexo theme for novel reading.

License

Notifications You must be signed in to change notification settings

BlockG-ws/hexo-theme-yuzu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexo-Theme-Yuzu

本项目从 hexo-theme-orange fork 出来,鉴于无法找到原作者联系方式,本项目将由Cerallin继续维护。

当前分支为 v3.x 版本,使用pug代替ejs作为模板引擎。

注意 从v2.x迁移到v3.x需要安装hexo-renderer-pug。将鼠标悬停在网页页脚Theme Yuzu上可以查看当前主题版本。

安装使用

# 在hexo网站源码目录下执行
$ npm i hexo-renderer-pug
$ mkdir -p themes && cd themes
$ git clone https://github.com/Cerallin/hexo-theme-yuzu

config.ymltheme 字段改为 hexo-theme-yuzu,在 config.yml 中添加如下内容:

since_year: 2020

# 此处的theme_config.root请设置与root相一致(一般在url下一行)
theme_config:
  root: /

post_copy:
  text: 署名-非商业性使用-相同方式共享
  text_en: CC BY-NC-SA 2.5 CN
  link: https://creativecommons.org/licenses/by-nc-sa/2.5/cn/

# 自定义侧边栏
menu:
  Archives:
    widget: Archives # 三种:Archives | Posts | Tags
  Posts1:
    name: Posts
    widget: Posts
  Posts2:
    name: Posts2
    widget: Posts
  Tags:
    widget: Tags

# 右上角
otherMenu2:
  关于: /about

# 备案
beian:
  enable: true
  icp: 京ICP备xxxxxxxx号

# toc
toc: true

visit_count:
  type: busuanzi
  # or
  # type: visitor-counter
  # url: //your.counter.site/count.php

In case you didn't know 你可以创建一个_config.[theme name].yml文件来覆盖主题的默认设置。对于上述安装方法来说,就是_config.hexo-theme-yuzu.yml

示例网站

什么?你问我小说站在哪?我才不会告诉你呢(/ω•\*)。

特色

  • 黑白色调,风格质朴简约。
  • 针对文章创作优化,学术博客也是可以的 (?)。
  • 支持深色模式,自适应电脑/手机深浅色模式。

功能

  • 支持分页(hexo-generator-*)
  • 支持显示 CC(Creative Commons)版权声明
  • 文章文字两端对齐
  • 适配学术写作(pandoc)

禁止用户复制粘贴网页内容

本选项仅为君子协定,通过插件可以轻易破解。 将主题配置文件中的selectable值改为false

深色模式

将主题配置文件中的dark_mode值改为true

学术写作指南

请先安装hexo-renderer-pandoc

三线表格

| key          | value                    |  type   |
| :----------- | :----------------------- | :-----: |
| num          | 65535                    | integer |
| post         | {id: 4, content: "text"} | object  |
| article_list | [{id: 1}, {id: 2}]       |  array  |
: 表格名 {#ref:tbl-name}

![figure description](/path/to/figure.jpg){#ref:fig-name}

推荐插件

  • hexo-filter-mathjax: 渲染生成mathjax公式;
  • hexo-filter-text-autospace: 为中文段落中的英文自动添加间距。
  • hexo-clean-css:缩小生成的CSS文件的体积。由于Stylus自身的限制,本主题的CSS文件大小有很大的缩减空间。

本主题提供了一些类似tailwind css的辅助工具类。

例如,通过text-{left|right|justify}控制文字对齐,使用 m{t|r|b|l}-{size} 功能类控制元素一侧的外边距等等。

详细介绍请移步这里

TODOs

  • 整理主题变量
  • 重构模板布局,优化模板缓存
  • 开发“关于”页的模板
  • 更多动画
  • 更多的helpers类

License

This project is under MIT License.

Copyright (c) 2021-2023 Cerallin   <cerallin@cerallin.top>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Bootstrap icons

Part of Bootstrap opensource SVG icon library is used in this project, which is under MIT license.

Clipboard.js

Clipboard.js is used in this project, which is under MIT license.

Smooth-corners.js

Smooth-corners.js is used in this project, which is under MIT license.

About

A simple black/white hexo theme for novel reading.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Stylus 59.8%
  • Pug 27.4%
  • JavaScript 12.2%
  • Shell 0.6%