next-theme / hexo-theme-next Goto Github PK
View Code? Open in Web Editor NEW🎉 Elegant and powerful theme for Hexo.
Home Page: https://theme-next.js.org
License: Other
🎉 Elegant and powerful theme for Hexo.
Home Page: https://theme-next.js.org
License: Other
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
在页面设置 sidebar: false 时, 侧边栏应隐藏
debug 之后发现是过滤器的问题
next/layout/_partials/head/head-unique.njk
<script id="page-configurations">
// https://hexo.io/docs/variables.html
CONFIG.page = {
sidebar: {{ page.sidebar | json }},
isHome : {{ is_home() }},
isPost : {{ is_post() }},
lang : '{{ page.lang }}'
};
</script>
next/scripts/renderer.js
env.addFilter('json', dictionary => {
return JSON.stringify(dictionary || '');
});
导致输出在页面的配置为 ''
而不是 false
.
修改为
env.addFilter('json', dictionary => {
if (typeof dictionary !== "undefined" && dictionary !== null) {
return JSON.stringify(dictionary);
} else {
return '""';
}
});
后正常
侧边栏仍然显示
配置文件
sidebar:
# Sidebar Position.
#position: left
position: right
# Manual define the sidebar width. If commented, will be default for:
# Muse | Mist: 320
# Pisces | Gemini: 240
#width: 300
# Sidebar Display (only for Muse | Mist), available values:
# - post expand on posts automatically. Default.
# - always expand for all pages automatically.
# - hide expand only when click on the sidebar toggle icon.
# - remove totally remove sidebar including sidebar toggle.
display: post
# Sidebar padding in pixels.
padding: 18
# Sidebar offset from top menubar in pixels (only for Pisces | Gemini).
offset: 12
# Enable sidebar on narrow view (only for Muse | Mist).
onmobile: false
新建一个 post, 设置 sidebar: false
I found a problem when I used the sticky feature in writting post.
As shown in the following figure, there is no blank space between sticky icon and post title in my case, but I notice that a post of NexT theme doc's website has the blank space.
The following are my environments:
Is something wrong with that? How to add the blank space?
Thanks in advance.
请教下,本仓库与https://github.com/theme-next/hexo-theme-next 的区别是什么?似乎之前一直是在那个仓库维护的?好奇是出于什么原因,next开始分两个仓库并行维护了?
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
# Valine
# For more information: https://valine.js.org, https://github.com/xCss/Valine
valine:
enable: false
appId: # Your leancloud application appid
appKey: # Your leancloud application appkey
placeholder: Just go go # Comment box placeholder
avatar: mm # Gravatar style
meta: # Custom comment header
- nick
- mail
- link
pageSize: 10 # Pagination size
language: # Language, available values: en, zh-cn
visitor: false # Article reading statistic
comment_count: true # If false, comment count will only be displayed in post page, not in home page
recordIP: false # Whether to record the commenter IP
serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
#post_meta_order: 0
在评论参数中测试已支持其它的一些参数如:
enableQQ: true # 是否启用昵称框自动获取QQ昵称和QQ头像
requiredFields: # 设置备填项
- mail
官方说明:
enableQQ
类型: Boolean
默认值: false
必要性: false
是否启用昵称框自动获取QQ昵称和QQ头像, 默认关闭,需博/网站主主动启用
v1.4.6+
requiredFields
类型: Array
默认值: []
必要性: false
设置必填项,默认匿名,可选值:
['nick']
['nick','mail']
v1.4.6+
本地已测试可用,感觉这两项虽然可选,但是在QQ获取头像,还有邮件方面,相对于评论通知还是有一定的作用。希望能添加。
详见https://valine.js.org/configuration.html 最后两项配置。
The latest Next-theme are pretty awesome, thanks the work for that.
Here I have a problem to add customized contents. My goal is to add some contents with customized style in the end of post-body but only after post-followme.
I have tried two methods. One was postBodyEnd in custom_file_path of theme config, the other was theme_inject feature with injectPoint which is postBodyEnd.
Both methods didn't achieve my goals. The customized contents are added before post-reward.
I check the code of next/layout/_macro/post.njk and found:
{%- if not is_index %}
{{- next_inject('postBodyEnd') }}
{%- if post.reward_settings.enable %}
{{ partial('_partials/post/post-reward.njk') }}
{%- endif %}
The postBodyEnd is injected before post-reward. Therefore, the method using postBodyEnd of theme config absolutely can't work.
hexo.extend.filter.register('theme_inject', function(injects) {
injects.postBodyEnd.file('post-end', 'source/_data/post-end.njk');
});
This method also didn't work. Am I doing something wrong with this method? How could I add customized contents after post-followme?
Thanks in advance.
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
与其他手机浏览器一样
手机通过夸克浏览器访问网站, 点开一篇文章, 排版错乱
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
Just like before, the red reward button. Or give an option: red and other color.
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
页面在本地预览时,可以正常加载。
hexo g
可以正常生成,但页面在localhost:4000
无法正常加载,如图:
报错信息:
utils.js:238 Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#1级标题' is not a valid selector.
at http://localhost:4000/js/utils.js:238:31
at Array.map (<anonymous>)
at Object.registerSidebarTOC (http://localhost:4000/js/utils.js:236:36)
at Object.NexT.boot.refresh (http://localhost:4000/js/next-boot.js:92:14)
at HTMLDocument.<anonymous> (http://localhost:4000/js/next-boot.js:112:13)
文章内容:
---
title: demo
date: 2020-06-02 19:21:07
categories:
tags:
---
测试文章
# 一级标题
汉字
# 1级标题
数字
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
我已升级到最先版本 8.0.0-rc.4
但是我在8.0.0-rc.3中使用的自定义tags folding (themes\next\scripts\tags\folding.js) 好像不能用了
hexo s 后报错 “unknown block tag: folding”,但我并不知道如何更改,请问该如何更改?
代码如下:
'use strict';
function postFolding(args, content) {
args = args.join(' ').split(',');
let style = ''
let title = ''
if (args.length > 1) {
style = args[0].trim()
title = args[1].trim()
} else if (args.length > 0) {
title = args[0].trim()
}
if (style != undefined) {
return `<details ${style}><summary> ${hexo.render.renderSync({text: title, engine: 'markdown'}).split('\n').join('')} </summary>
<div class='content'>
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
</div>
</details>`;
} else {
return `<details><summary> ${hexo.render.renderSync({text: title, engine: 'markdown'}).split('\n').join('')} </summary>
<div class='content'>
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}
</div>
</details>`;
}
}
hexo.extend.tag.register('folding', postFolding, {ends: true});
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
Next 8.x和插件hexo-enchancer兼容,互不影响!
安装Next 8.x后再安装插件hexo-enchancer,然后执行hexo clean && hexo g && hexo s
该语句会报错,错误代码:
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
ReferenceError: src is not defined
at filterPost (E:\Hexo\node_modules\hexo-enhancer\index.js:60:5)
at Hexo.<anonymous> (E:\Hexo\node_modules\hexo-enhancer\index.js:67:9)
at Hexo.tryCatcher (E:\Hexo\node_modules\bluebird\js\release\util.js:16:23)
at Hexo.<anonymous> (E:\Hexo\node_modules\bluebird\js\release\method.js:15:34)
at E:\Hexo\node_modules\hexo\lib\extend\filter.js:62:52
at tryCatcher (E:\Hexo\node_modules\bluebird\js\release\util.js:16:23)
at Object.gotValue (E:\Hexo\node_modules\bluebird\js\release\reduce.js:166:18)
at Object.gotAccum (E:\Hexo\node_modules\bluebird\js\release\reduce.js:155:25)
at Object.tryCatcher (E:\Hexo\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (E:\Hexo\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (E:\Hexo\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (E:\Hexo\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (E:\Hexo\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (E:\Hexo\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (E:\Hexo\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (E:\Hexo\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (E:\Hexo\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:456:21)
安装Hexo Next主题
安装插件hexo-enchancer
执行hexo clean && hexo g && hexo s
语句
v12.18.2
6.14.5
[email protected] E:\Hexo
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected] (github:next-theme/hexo-next-fireworks#1392a15ad2abebd7f4982f97367524dda3c2fc63)
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
插件hexo-enchancer与Next 7.x版本兼容,与Next 8.x版本不兼容
The following is the Chinese translation of the update notes. See
https://github.com/next-theme/hexo-theme-next/releases
and
https://theme-next.js.org/docs/troubleshooting.html#Quick-Debug-Instructions
for the English version.
以下是常见问题的说明,烦请过目。
在每次更新主题前,请务必阅读以下更新说明,特别是Breaking Change
部分(这涉及到了一些重大更新,可能影响先前的用户配置或自定义)。
https://github.com/next-theme/hexo-theme-next/releases
为了避免操作失误导致配置文件冲突或源码丢失,我们建议使用 Git 等工具对博客源码做好版本管理和备份。这样做有很多好处,比如你可以使用 GitHub Actions 来自动进行博客部署。
NexT 一贯以「开箱即用」为目标,尽量隐藏复杂的实现,将简洁易懂的配置提供给用户。不过,虽然 _config.yml
中对很多配置选项都提供了注释,但一些选项的细节并没有完全展现。为了避免出现问题,请在进行配置和使用前阅读网站 https://theme-next.js.org 上对应的文档。对于文档中描述不清楚的地方,欢迎提出改进建议 😊
此外,通过搜索引擎可以找到许多 NexT 热心用户创作的教程文章。不过,在过去的数年时间里,NexT 新增了大量的 Feature,有部分内容是常见的教程没有涵盖的。后文中摘录了部分 NexT v7 版本的新功能及使用说明,供参考。
使用 NexT 时遇到了问题?不用担心!有许多种方法可以与 NexT 主题开发/维护者团队(下称「NexT 团队」)或其他用户取得联系,共同解决问题:
我们通过 GitHub Actions 进行自动化测试,确保 NexT 可以在 Windows,macOS 以及 Linux 上正常使用: https://github.com/next-theme/hexo-theme-next/actions?query=workflow%3ATester
Hexo 支持直接在 Windows 上运行,无需使用 mingw 等环境。
版本 | Hexo 3.0.0-beta.4 或更低 | Hexo 3.0.0-rc.1 ~ 3.9 | Hexo 4.0 ~ 4.2.1 | Hexo 5.0 ~ 5.2.0 | Hexo 5.3.0 或更高 |
---|---|---|---|---|---|
NexT v0.4.5.1 或更低 | ✅ | ✅ | ❌ 图标显示问题 | ❌ 图标显示问题 | ❌ 图标显示问题 |
NexT v0.4.5.2 ~ v7.4.1 | ✅ | ❌ 图标显示问题 | ❌ 图标显示问题 | ❌ 图标显示问题 | |
NexT v7.4.2 ~ v8.1.0 | ✅ | ✅ | ✅ | ✅ | |
NexT v8.2.0 ~ v8.3.0 | ✅ | ✅ | |||
NexT v8.4.0 ~ v8.5.0 | ❌ 不支持escape_html |
✅ | |||
NexT v8.6.0 或更高 | ✅ | ✅ |
如果可能,请始终使用最新版本的 Hexo 和 NexT。对于用户而言,新版本 Hexo 带来的渲染性能的提升非常显著。
NexT 一共有三个不同的仓库:
版本 | 年份 | 仓库 |
---|---|---|
v5.1.4 或更低 | 2014 ~ 2017 | https://github.com/iissnan/hexo-theme-next |
v6.0.0 ~ v7.8.0 | 2018 ~ 2019 | https://github.com/theme-next/hexo-theme-next |
v8.0.0 或更高 | 2020 | https://github.com/next-theme/hexo-theme-next |
一些网络教程可能使用了旧仓库的链接。为了避免安装过时的 NexT 版本,请务必按照本仓库 README 中提供的几种安装方式进行操作。
跨版本的升级可能并不顺滑(例如由 v5.1.4 或 v7.8.0 升级至 v8.0.0),请备份配置文件及修改过的文件(例如自定义模板文件)后,重新安装新的主题。具体操作请阅读文档: https://theme-next.js.org/docs/getting-started/upgrade.html
NexT 支持在不修改主题仓库内文件的情况下进行配置和自定义,因此无论是使用 Git 还是 npm 安装的主题都能顺利更新。
_config.next.yml
配置文件为了避免更新出现冲突,推荐使用 Alternate Theme Config 存储配置:https://theme-next.js.org/docs/getting-started/configuration.html
注:在升级到 Hexo 5.0 版本后,请留意配置方式上的改变,使用 Hexo 支持的 _config.next.yml
代替 source/_data/next.yml
。旧的 next.yml
配置方式诞生于 2015 年(iissnan/hexo-theme-next#328),已经完成其历史使命,于 NexT v8.1.0 版本后停止支持。
PR theme-next/hexo-theme-next#868 调整了自定义布局或样式的方式,取消原本主题目录下的自定义文件(例如 _custom/custom.styl
),只保留在配置文件中指定自定义文件的方式。 自定义文件与主题文件分离是个好的实践,这样可以在不修改任何主题原始代码的情况下加入自定义内容;可以避免由于 git merge
产生冲突,同时也允许在通过 npm
安装主题时方便地进行自定义。
你可以将所有自定义布局或样式放在一个位置特定位置(比如:hexo-site/source/_data
),然后取消注释主题配置文件中 custom_file_path
部分下对应的内容(注意文件名与路径要一致),即可完成对于主题的自定义。这个页面提供了几个使用 Custom Files 的例子,例如加载看板娘、修改页面宽度、隐藏 cheers
等等: https://theme-next.js.org/docs/advanced-settings/custom-files.html
Custom Files 在向页面中增加内容时非常方便。如果要在不修改主题源码的情况下修改或删除内容,请使用插件 https://github.com/jiangtj/hexo-extend-theme
除了 custom_file_path,我们还提供了更加灵活的自定义方式(theme_inject
),可以阅读文档: https://theme-next.js.org/docs/advanced-settings/injects.html
这一特性使得 NexT 主题拥有了一套不同于 Hexo 的插件系统。不妨看看这个仓库: https://github.com/next-theme/awesome-next
如果有新颖的想法,或着撰写了关于 NexT 主题的教程,抑或是希望将自己的博客作为 NexT 主题演示站,欢迎在这里提交 Pull Request!
鉴于 swig 缺乏维护,NexT 自 7.4.2 版本开始,使用 Nunjucks 代替 swig 作为模版引擎。如果此前根据 swig 的语法写过自定义内容,请在更新前确认它们是与 Nunjucks 兼容的,否则会报错,且生成的页面为空白。例如, Nunjucks 只支持 and
运算符,需要替换掉 swig 中的 &&
。见 http://mozilla.github.io/nunjucks/getting-started.html
Hexo 5.0 版本移除了对于 swig 模版的支持,改为独立的 hexo-renderer-swig 插件。如果你发现 Hexo 生成的 html 中输出了 NexT 模版源码,说明你正在使用旧版本的 NexT,请重新安装或升级 NexT。
auto_excerpt
自 7.6.0 版本开始,auto_excerpt
功能被移除,因为按照字数截断文章,必须先移除其中的 HTML 标签,这将导致图片、代码块显示错误;并且,它也并不属于 Hexo 主题应当负责的内容。我们推荐通过 <!-- more -->
来精确控制 Read More 的位置;或者设置 excerpt_description
然后为每篇文章指定 description
。当然,也可以自行安装第三方插件:
https://github.com/chekun/hexo-excerpt
https://github.com/ashisherc/hexo-auto-excerpt
作出以上改动后,请执行 hexo clean
。
如果开启了访问量统计功能,请确保 Hexo 配置文件中的url
正确设置为了你的网站域名,否则统计不会生效(这是为了屏蔽来自 http://localhost:4000
的流量);如果使用 GitHub pages 和自定义域名,请将 url
设置为自定义域名而不是 *.github.io
;如果同时使用了带有 www 和不带 www 的域名,请进行 301 重定向。
7.7.2 版本中,NexT 主题升级了内置的 MathJax 的版本。旧版本的 NexT 文档中建议使用 MathJax 的用户安装 hexo-renderer-kramed,但由于这一插件已经停止维护,在这次 MathJax 升级后将不再被 NexT 支持,请使用 hexo-renderer-pandoc 代替(需要先安装 pandoc)。此外,如果在 vendors
中设置了 CDN 链接,请更新或移除它们以使用默认的 CDN 配置,否则会加载失败。
NexT 除内置的 MathJax 和 KaTeX 引擎外,还提供了 hexo-filter-mathjax 插件用于后端渲染,无需加载前端脚本,欢迎使用。
7.7.2 版本中,NexT 主题加入了对暗色模式的支持。在配置文件中设置 darkmode: true
,并在启用了暗色模式的操作系统中,使用支持 prefers-color-scheme
属性的浏览器即可体验。
见 https://caniuse.com/prefers-color-scheme
NexT 主题自 8.0.0 版本开始,将自带的 Font Awesome 图标库由 4.7.0 版本升级为了 5.13.0 版本。此次升级并不向下兼容,请修改配置文件中与 Font Awesome 相关的内容,否则图标可能无法正常显示。
全部可选图标在此: https://fontawesome.com/icons
如果要使用 Font Awesome 没有收录的图标,请看这篇文章: https://blog.dlzhang.com/posts/32/
鉴于 Velocity.js 缺乏维护,NexT 使用 Animate.css 代替之。两者的动画效果几乎完全一致,除了动画名称略有不同。如果在配置文件中设置了旧的名称(例如 slideDownIn
),请将其移除或根据此网页选择新的动画效果:
https://theme-next.js.org/animate/
NexT 已支持一键切换 CDN 服务商,而不需要为每个插件单独设置 CDN 地址。见 https://theme-next.js.org/docs/advanced-settings/vendors.html
手动设置 CDN 地址会增加管理成本,并且可能错误地加载不兼容的脚本。我们不建议用户继续使用这一方式。
Valine 使用 Leancloud 作为后端,是一个深受静态博客用户喜爱的评论系统。然而 Valine 暴露出了一些令人担忧的问题:
考虑到这些问题已经严重影响到 NexT 用户的数据安全,我们决定将其移除,需要继续使用的用户请安装插件: https://github.com/next-theme/hexo-next-valine
(插件的配置项使用驼峰命名,与 Valine 本身一致,需要注意将 appid
和 appkey
改为 appId
和 appKey
)
由于 Valine 不再开源,NexT 团队无法对其 Debug。如果在使用时出现任何问题,请在这里反馈: https://github.com/xCss/Valine/issues
从 Valine 迁移到 Disqus: https://github.com/YunYouJun/valine-to-disqus
NexT 为了支持 highlight.js 提供的近百个代码高亮主题,使用正则表达式从 css 中提取代码块的前景、背景色。虽然这样做可能无法完全支持 css 的语义信息,但对现有的绝大多数 highlight.js 主题都适用。highlight.js 11.0 版本后发布的 css 经过了压缩,导致原有的正则表达式失效,因此向 stylus 引擎传递了空值。这一问题在 NexT 的 8.10.0 版本中被修复。NexT 此前默认的暗色代码高亮主题 tomorrow-night
同样跟随 Highlight.js 更新,请手动将其更改为 base16/tomorrow-night
。
名称 | 问题描述 | 解决方案 | Issue |
---|---|---|---|
hexo-helper-live2d | 会导致不蒜子计数无法加载 | 不要同时使用 | theme-next/hexo-theme-next#1233 (comment) |
aplayer | 导致中文目录无法点击 | 不要使用 aplayer | DIYgod/APlayer#242 |
_config.yml
中有一些选项可以修改页面的永久链接形式(permalink
)。而 NexT 所集成的评论系统可能需要通过页面的 URL 加载对应的数据。如非必要,请不要修改有关设置,以免评论数据丢失。opacity
,那么这会创建新的层叠上下文,进而影响其它元素的 z-index
表现,例如导致搜索框显示不正常(theme-next/hexo-theme-next#914)NexT 主题会尽可能保证配置文件向下兼容,使得用户能够平滑升级。但在 NexT 主题不断发展和完善的过程中,难免会出现配置和使用方式的变化。因此,在更新主题前一定要先阅读对应的 Release Notes,切勿在不了解更新内容的情况下进行更新。
NexT 团队仅对使用最新版本 NexT 主题的用户提供技术支持,并将拒绝解答使用旧版本 NexT 出现的任何问题。 如果使用版本号为 5.x 至 7.x 的主题出现问题,请到对应的旧的仓库中提交 Issue。
2.1 如果使用 npm
安装主题,那么默认是本仓库的最新版本,不用担心。
2.2 如果使用 git
安装主题,请务必检查主题的 package.json
中 version
字段版本号是否正确。
也请各位遵守 AGPL 协议,这包括对于修改 NexT 主题后开放源代码的要求,以及 NexT 团队对由使用 NexT 主题造成的任何问题免责。
如果在使用中遇到问题,欢迎提交 Issue。在提交 Issue 前,可以先在已有的 Issue 中搜索一下,或许就能找到相似的问题;尽量不要重复提交。
提交 Issue 时,请务必根据模版,提供网站的链接、源码仓库和有关截图。 需要这些信息的原因是:
为了更快地解决问题,在使用 NexT 主题遇到 Bug 时,可以先自行按照以下方法排查(因为问题可能并非来自 NexT 主题本身): https://theme-next.js.org/docs/troubleshooting.html#Quick-Debug-Instructions
如果对主题进行过自定义,那么请移除全部的自定义文件,检查 Bug 是否仍然存在。
如果是在升级 Hexo 或 Hexo 插件后遇到的问题,请尝试:
如果这并非一个来自于 NexT 主题的 bug,可以尝试向 Hexo 团队寻求帮助:https://github.com/hexojs/hexo/issues
另见: https://github.com/next-theme/hexo-theme-next/blob/master/docs/zh-CN/CONTRIBUTING.md#你需要了解的
使用前文介绍的 custom_file_path
,可以轻松地将自定义的 HTML,JavaScript 和 CSS 插入到页面中。因此,对于一些简单且小众的功能,我们建议用户自行实现,并通过 Awesome NexT 进行推广。例如,想要在页面中隐藏一个组件,往往用一行 CSS 就可以实现。这时我们一般不会考虑专门为此在配置文件中增加新的选项。
我们非常欢迎通过 Pull Request 来加入新功能或修复 Bug。在修改主题的样式时,请注意考虑 NexT 主题四个 Scheme 之间的差异。这可能要求额外的代码来确保样式的一致性,并避免改动对于其它 Scheme 的破坏。此外,配色方案的设计也需要考虑暗色模式的支持。
写在最后:如果你希望 NexT 主题变得更好,那么请加入 Telegram 群聊或参与 GitHub 上的讨论,因为许多关键的改动都会通过投票的方式征求意见。我们非常希望用户的反馈能够产生积极、正面的效果。对 NexT 社区做出贡献的方法有很多,如果你是开发者,那么提交代码是最直接的方式;而对于广大用户而言,及时地将使用体验反馈给 NexT 团队同样是非常重要的。
感谢各位对 NexT 主题及 NexT 团队的支持。祝使用愉快!
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
I ran this on Arch Linux.
sudo npm install -g hexo-cli
mkdir hexo && cd hexo
hexo init
git clone https://github.com/next-theme/hexo-theme-next themes/next
# set `theme: next` in hexo/_config.yml
hexo server
highlight.js version is 9.18.1.
If I change this line in scripts/events/lib/highlight.js
config.highlight.hljs = false;
to config.highlight.hljs = true;
then highlight works as expected.
It seems so evident to me, but I can upload my repo if requested.
$ node -v && npm -v
v14.3.0
6.14.5
$ npm ls --depth 0
[email protected] /tmp/test
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Hexo
subtitle: ''
description: ''
keywords:
author: John Doe
language: en
timezone: ''
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## Use post's date for updated date unless set in front-matter
use_date_for_updated: false
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: ''
DId not change default config.
I want to use tabs feature of tag plugins with icons. The following are my codes:
{% tabs tabs_name %}
<!-- tab 开源 @osi -->
text
<!-- endtab -->
{% endtabs %}
The icon didn't work and showed messy.
I realized the problem might be the prefix of Font Awesome. Therefore, I checked the codes of next/scripts/tags/tabs.js and found following code in line 45.
if (!icon.startsWith('fa')) icon = 'fa fa-' + icon;
Does it mean that it would add 'fa fa-' as prefix by default to all icons? If that's true, I couldn't add osi icon in this way because of the prefix of osi icon in Font Awesome 5.13.0 being 'fab fa-'.
Font Awesome 5.x version has more prefixs than 4.x version, like fas, far, fab, not only fa anymore. Could tag plugins support more prefixs for icons?
If my assumption is wrong, how could I solve this problem?
Thanks in advance.
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
_data/style.styl
文件中修改了 sidebar
的属性 visibility
为 visible
来规避问题。// 隐藏 valine 的 powered by
.vcopy{
display: none !important;
}
// valine 评论框对齐文章
div#comments.comments.v{
margin-left: 0px ;
margin-right: 0px ;
border: 0px;
}
// Valine 隐藏系统信息
.vsys,.vpower{
display:none !important;
}
.v[data-class=v] code{
color: black;
}
// 头像旋转特效
if (hexo-config('avatar.rotated')) {
.site-author-image {
transition: transform 0s ease-out;
animation: rotate 5s linear infinite;
}
@keyframes rotate{from{transform: rotate(0deg)}
to{transform: rotate(360deg)}
}
.site-author-image:hover {
// transform: rotateZ(360deg);
}
}
// 底部的网站信息样式
.upy {
vertical-align:middle;
display inline;
margin-right: 0.5em
}
.footer-a {
border-bottom:none;
color:#999
}
.footer-a:hover{
color:#999
}
//博客内容透明化
//文章内容的透明度设置
.content-wrap {
opacity: 0.95;
}
//侧边框的透明度设置
.sidebar-inner {
background: rgba(255,255,255,0.9);
}
.sidebar{
visibility: visible
}
//菜单栏的透明度设置
.header-inner {
background: rgba(255,255,255,0.9);
}
// 背景
body {
background-image:url(../images/bg.jpg);
height:100%;
width:100%;
background-repeat:repeat-x;
background-attachment:fixed;
background-size:cover;
background-position:center;
overflow-y: scroll
}
// 网站名称brand部分
.site-brand-container {
background-image: linear-gradient(-225deg, #2CD8D5 0%, #C5C1FF 56%, #FFBAC3 100%, #ddd6f3 0%);
background-size: 400% 400%;
animation: gradient 10s ease infinite;
border-radius: 20px 20px 0 0
}
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
// 副标题
.site-subtitle {
color: var(--brand-color);
}
// 顶部黑条
@media(min-width:992px) {
.headband {
background: transparent;
height: 10px;
}
}
@media(max-width:992px) {
.headband {
background: transparent;
height: 0px;
}
}
// 菜单栏
.menu {
margin-top: 1em;
}
.menu .menu-item a:before {
content: "";
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: linear-gradient(to right, #fdcbf1 0%, #fdcbf1 1%, #e6dee9 100%);
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transform-origin: 0 50%;
transform-origin: 0 50%;
-webkit-transition-property: transform;
transition-property: transform;
-webkit-transition-duration: 0.5s;
transition-duration: 0.5s;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;}
.menu-item a.menu-item-active, .menu-item a:hover, .menu-item span.exturl.menu-item-active, .menu-item span.exturl:hover {
background-image: linear-gradient(-225deg, #2CD8D5 0%, #C5C1FF 56%, #FFBAC3 100%, #ddd6f3 0%);
background-size: 400% 400%;
animation: gradient 10s ease infinite;
}
.menu .menu-item a:hover{
transform:scale(1);
}
.menu .menu-item a:hover:before, .menu .menu-item a:focus:before, .menu .menu-item a:active:before {
-webkit-transform: scale(1);
transform: scale(1);
}
// 分割线
hr {
position: relative;
margin: 2rem auto;
width: calc(100% - 4px);
border: 2px dashed #a4d8fa;
box-sizing: content-box;
height: 0;
overflow: visible;
}
// 社交连接
.links-of-author {
justify-content: flex-start;
}
::-webkit-scrollbar {
/*滚动条整体样式*/
width : 10px; /*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius : 10px;
background-color: skyblue;
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.2) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0.2) 75%,
transparent 75%,
transparent
);
}
::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
background: transparent;
}
.post-body h2:before,.post-body h3:before,.post-body h4:before,.post-body h5:before,.post-body h6:before,{
margin-right: 5px;
font-style: normal;
font-variant: normal;
line-height: 1;
-webkit-transition: all .2s ease-out;
-moz-transition: all .2s ease-out;
-o-transition: all .2s ease-out;
-ms-transition: all .2s ease-out;
transition: all .2s ease-out;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
font-weight: 600;
}
.post-body h2:before{
content: "🍦";
}
.post-body h3:before{
content: "🌸";
}
.post-body h4:before{
content: "⛄️";
}
.post-body h5:before{
content: "🔥";
}
.post-body h6:before{
content: "🌱";
}
# 是否提醒新版本
reminder: true
# 是否允许缓存
cache:
enable: true
# 是否在文件生成后清除无用文件
minify: true
# 定义自定义文件路径
custom_file_path:
#head: source/_data/head.njk
#header: source/_data/header.njk
#sidebar: source/_data/sidebar.njk
postMeta: source/_data/post-meta.njk
postBodyEnd: source/_data/post-body-end.njk
footer: source/_data/footer.njk
bodyEnd: source/_data/body-end.njk
variable: source/_data/variables.styl
#mixin: source/_data/mixins.styl
style: source/_data/styles.styl
# ----------- #
# 网站信息设置 #
# ----------- #
# 网站图标设置
favicon:
small: /images/favicon.png
medium: /images/favicon.png
apple_touch_icon: /images/favicon.png
safari_pinned_tab: /images/favicon.png
# 页脚设置
footer:
# 页面底部图标,动画和颜色
icon:
name: fas fa-heart
animated: true
color: '#807f7f'
# 网站的版权信息,默认使用站点配置文件中的author
copyright:
# 是否显示网页底部的HEXO驱动和NEXT版本信息
powered: false
# 是否打开文章末尾的版权信息
creative_commons:
license: by-nc-sa
sidebar: false
post: true
language:
# ----------- #
# NEXT主题选择 #
# ----------- #
# 主题选择
#scheme: Muse
#scheme: Mist
#scheme: Pisces
scheme: Gemini
# --------- #
# 菜单栏设置 #
# --------- #
# 菜单设置
menu:
home: / || fas fa-home
categories: /categories/ || fas fa-th
tags: /tags/ || fas fa-tags
archives: /archives/ || fas fa-archive
stars: /stars/ || fas fa-star
about: /about/ || fas fa-user
message: /message/ || fas fa-comments
links: /links/ || fas fa-user-plus
# 是否显示菜单的图标和计数
menu_settings:
icons: true
badges: true
# --------- #
# 侧边栏设置 #
# --------- #
# 头像设置
avatar:
url: /images/avatar.png
rounded: true
rotated: true
# 社交链接
social:
GitHub: https://github.com/constown || fab fa-github
E-mail: http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=mvn19Onu9e302vz14vf78-a0_fX3 || fas fa-envelope
博客主站: https://blog.juanertu.com || fas fa-atom fa-spin
备用博客: https://constown.github.io/ || fas fa-atom fa-spin
# 社交链接设置是否只显示图标
social_icons:
enable: true
icons_only: false
transition: true
# 文章目录设置
toc:
enable: true
number: false
wrap: false
expand_all: false
max_depth: 6
# ----------- #
# 文章发布设置 #
# ----------- #
# 自动摘录
excerpt_description: true
# 阅读更多按钮
read_more_btn: true
# 文章头部信息设置
post_meta:
item_text: true
created_at: true
updated_at:
enable: false
another_day: true
categories: true
# 文章字数统计
symbols_count_time:
separated_meta: false
item_text_post: false
item_text_total: false
# 文章底部标签的样式替换成tag
tag_icon: true
# 打赏设置
reward_settings:
enable: false
animation: false
# 打赏二维码
reward:
wechatpay: /images/wechatpay.png
alipay: /images/alipay.png
follow_me:
#Twitter: https://twitter.com/username || fab fa-twitter
#Telegram: https://t.me/channel_name || fab fa-telegram
#WeChat: /images/wechat_channel.jpg || fab fa-weixin
#RSS: /atom.xml || fa fa-rss
# 文章底部相关文章推荐
related_posts:
enable: true
title: 相关文章推荐
display_in_home: false
params:
maxCount: 10
#PPMixingRate: 0.5
#isDate: false
#isImage: false
#isExcerpt: false
# ----------- #
# 主题其他设置 #
# ----------- #
# 代码块设置
codeblock:
theme:
light: agate
dark: dark
# Add copy button on codeblock
copy_button:
enable: true
# Available values: default | flat | mac
style: mac
# 返回按钮设置
back2top:
enable: true
# 在侧边栏中显示.
sidebar: true
# 显示进度.
scrollpercent: true
# 阅读进度条
reading_progress:
enable: true
# 显示位置: top | bottom
position: bottom
color: "#37c6c0"
height: 5px
# 书签
bookmark:
enable: false
color: "#222"
save: auto
# 右上角显示GitHub图标
github_banner:
enable: false
permalink: https://github.com/constown
title: Follow me on GitHub
# ------- #
# SEO设置 #
# ------- #
# 在移动设备上禁用百度转换.
disable_baidu_transformation: false
# 是否将站点副标题添加到索引.
index_with_subtitle: true
# 自动添加外部URL与Base64加密和解密。
exturl: true
# Google 站长管理工具验证码.
# See: https://www.google.com/webmasters
google_site_verification:
# Bing 站长管理工具验证码.
# See: https://www.bing.com/webmaster
bing_site_verification:
# Baidu 站长管理工具验证码.
# See: https://ziyuan.baidu.com/site
baidu_site_verification:
# 启用百度推送.
baidu_push: true
# 百度统计
baidu_analytics:
# ------------------ #
# 第三方工具和服务设置 #
# ------------------ #
# 数学公式支持
math:
per_page: true
mathjax:
enable: true
mhchem: false
katex:
enable: false
copy_tex: false
pjax: true
# 懒加载图片.
lazyload: true
# Pangu Support
pangu: true
# ------- #
# 评论设置 #
# ------- #
# Valine
valine:
enable: true
appId:
appKey:
placeholder: 在这里留下你的足迹吧! (留下昵称和邮箱即可接收回复邮件提醒哦)
avatar: robohash
meta: # Custom comment header
- nick
- mail
pageSize: 10
language: zh-cn
visitor: false
comment_count: false
recordIP: false
serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
#post_meta_order: 0
# ------- #
# 统计设置 #
# ------- #
busuanzi_count:
enable: false
total_visitors: true
total_visitors_icon: fas fa-user
total_views: true
total_views_icon: fas fa-eye
post_views: true
post_views_icon: fas fa-eye
# ----------- #
# 本地搜索设置 #
# ----------- #
local_search:
enable: true
trigger: auto
top_n_per_article: 1
unescape: false
preload: true
# -------- #
# Tags设置 #
# -------- #
# Note tag (bs-callout)
note:
# Note tag style values:
# - simple bs-callout old alert style. Default.
# - modern bs-callout new (v2-v3) alert style.
# - flat flat callout style with background, like on Mozilla or StackOverflow.
# - disabled disable all CSS styles import of note tag.
style: simple
icons: false
# Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).
# Offset also applied to label tag variables. This option can work with disabled note tag.
light_bg_offset: 0
# Tabs tag
tabs:
transition:
tabs: true
labels: true
# Mermaid tag
mermaid:
enable: true
# Available themes: default | dark | forest | neutral
theme: forest
# -------- #
# 动画设置 #
# -------- #
motion:
enable: true
async: false
transition:
# All available transition variants: https://theme-next.js.org/animate/
post_block: fadeIn
post_header: fadeInDown
post_body: fadeInDown
coll_header: fadeInLeft
# Only for Pisces | Gemini.
sidebar: fadeInDown
# ---------- #
# CDN加载设置 #
# ---------- #
vendors:
# Available values: local, jsdelivr, unpkg
# internal: local
anime: //cdn.jsdelivr.net/npm/[email protected]/lib/anime.min.js
fontawesome: //cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css
mathjax: //cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
# KaTeX
katex: //cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css
copy_tex_js: //cdn.jsdelivr.net/npm/katex@0/dist/contrib/copy-tex.min.js
copy_tex_css: //cdn.jsdelivr.net/npm/katex@0/dist/contrib/copy-tex.min.css
pjax: //cdn.jsdelivr.net/gh/next-theme/pjax@0/pjax.min.js
jquery: //cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js
# Lazyload
lazyload: //cdn.jsdelivr.net/npm/lozad@1/dist/lozad.min.js
# Pangu
pangu: //cdn.jsdelivr.net/npm/pangu@4/dist/browser/pangu.min.js
# Valine
valine: //cdn.jsdelivr.net/npm/valine@1/dist/Valine.min.js
# Mermaid
mermaid: //cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js
# Internal version: 1.2.1
velocity: //cdn.jsdelivr.net/npm/velocity-animate@1/velocity.min.js
velocity_ui: //cdn.jsdelivr.net/npm/velocity-animate@1/velocity.ui.min.js
prism: //unpkg.com/prismjs@1/components/prism-core.min.js
prism_autoloader: //unpkg.com/prismjs@1/plugins/autoloader/prism-autoloader.min.js
prism_line_numbers: //unpkg.com/prismjs@1/plugins/line-numbers/prism-line-numbers.min.js
# 搞怪网站标题
title_trick:
enable: true
leave: "(*^▽^*)我藏好了哦~"
enter: "q(≧▽≦q)被你发现啦~"
.posts-expand .post-tags a
should has a dark background.
Do not need.
v14.4.0
6.14.5
[email protected] D:\Dev\magentaize.github.io
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Magentaize's Blog
subtitle: 'The soul of shade'
description: 'The soul of shade!'
keywords:
author: Magentaize!
language: en
timezone: Asia/Shanghai
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://magentaize.github.io
root: /
permalink: posts/:name/
permalink_defaults:
pretty_urls:
trailing_index: false # Set to false to remove trailing 'index.html' from permalinks
trailing_html: false # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :year/:title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 5
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## Use post's date for updated date unless set in front-matter
use_date_for_updated: false
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo: [email protected]:Magentaize/magentaize.github.io.git
branch: master
minify: true
# Define custom file paths.
# Create your custom files in site directory `source/_data` and uncomment needed files below.
custom_file_path:
#head: source/_data/head.njk
#header: source/_data/header.njk
#sidebar: source/_data/sidebar.njk
#postMeta: source/_data/post-meta.njk
#postBodyEnd: source/_data/post-body-end.njk
#footer: source/_data/footer.njk
#bodyEnd: source/_data/body-end.njk
#variable: source/_data/variables.styl
#mixin: source/_data/mixins.styl
style: source/_data/styles.styl
footer:
# Specify the date when the site was setup. If not defined, current year will be used.
since: 2017
# Icon between year and copyright info.
icon:
# Icon name in Font Awesome. See: https://fontawesome.com/icons
name:
# If you want to animate the icon, set it to true.
animated: false
# Change the color of icon, using Hex Code.
color: "#ff0000"
# Schemes
#scheme: Muse
scheme: Mist
#scheme: Pisces
#scheme: Gemini
# Dark Mode
darkmode: true
menu:
home: / || fa fa-home
#about: /about/ || fa fa-user
tags: /tags/ || fa fa-tags
#categories: /categories/ || fa fa-th
archives: /archives/ || fa fa-archive
#schedule: /schedule/ || fa fa-calendar
#sitemap: /sitemap.xml || fa fa-sitemap
#commonweal: /404/ || fa fa-heartbeat
# Enable / Disable menu icons / item badges.
menu_settings:
icons: true
badges: false
sidebar:
# Sidebar Position.
#position: left
position: right
# Manual define the sidebar width. If commented, will be default for:
# Muse | Mist: 320
# Pisces | Gemini: 240
#width: 300
# Sidebar Display (only for Muse | Mist), available values:
# - post expand on posts automatically. Default.
# - always expand for all pages automatically.
# - hide expand only when click on the sidebar toggle icon.
# - remove totally remove sidebar including sidebar toggle.
display: hide
# Sidebar padding in pixels.
padding: 18
# Sidebar offset from top menubar in pixels (only for Pisces | Gemini).
offset: 12
# Posts / Categories / Tags in sidebar.
site_state: true
# Table of Contents in the Sidebar
# Front-matter variable (unsupport wrap expand_all).
toc:
enable: true
# Automatically add list number to toc.
number: true
# If true, all words will placed on next lines if header width longer then sidebar width.
wrap: true
# If true, all level of TOC in a post will be displayed, rather than the activated part of it.
expand_all: true
# Maximum heading depth of generated toc.
max_depth: 6
# Show previous post and next post in post footer if exists
# Available values: left | right | false
post_navigation: left
codeblock:
# Code Highlight theme
# See: https://github.com/highlightjs/highlight.js/tree/master/src/styles
theme:
light: default
dark: tomorrow-night
# See: https://github.com/PrismJS/prism/tree/master/themes
prism:
light: prism
dark: prism-dark
# Add copy button on codeblock
copy_button:
enable: true
# Show text copy result.
show_result: true
# Available values: default | flat | mac
style: flat
# Easily enable fast Ajax navigation on your website.
# For more information: https://github.com/next-theme/pjax
pjax: true
# Vanilla JavaScript plugin for lazyloading images.
# For more information: https://github.com/ApoorvSaxena/lozad.js
lazyload: false
# Pangu Support
# For more information: https://github.com/vinta/pangu.js
# Server-side plugin: https://github.com/next-theme/hexo-pangu
pangu: true
# Progress bar in the top during page loading.
# For more information: https://github.com/HubSpot/pace
pace:
enable: true
# Themes list:
# big-counter | bounce | barber-shop | center-atom | center-circle | center-radar | center-simple
# corner-indicator | fill-left | flat-top | flash | loading-bar | mac-osx | material | minimal
theme: minimal
# Script Vendors. Set a CDN address for the vendor you want to customize.
# CDN URLs from UNPKG and CDNJS are provided in the comments for selection.
# If left blank, jsDelivr will be used as the default CDN provider.
# It's recommended to use the same version as internal ones to avoid potential problems.
# Remember to use the https protocol of CDN files when you enable https on your site.
vendors:
# Available values: local, jsdelivr, unpkg
internal: local
# Internal version: 3.1.0
anime: //cdn.jsdelivr.net/npm/[email protected]/lib/anime.min.js
# anime: //cdnjs.cloudflare.com/ajax/libs/animejs/3.1.0/anime.min.js
#anime:
# Internal version: 5.13.0
fontawesome: //cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css
# fontawesome: //cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css
#fontawesome:
# Prism
prism: //cdn.jsdelivr.net/npm/prismjs@1/components/prism-core.min.js
prism_autoloader: //cdn.jsdelivr.net/npm/prismjs@1/plugins/autoloader/prism-autoloader.min.js
prism_line_numbers: //cdn.jsdelivr.net/npm/prismjs@1/plugins/line-numbers/prism-line-numbers.min.js
#prism:
#prism_autoloader:
#prism_line_numbers:
# MathJax
# mathjax: //unpkg.com/mathjax@3/es5/tex-mml-chtml.js
# mathjax: //cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.5/es5/tex-mml-chtml.js
mathjax:
# KaTeX
# katex: //unpkg.com/katex@0/dist/katex.min.css
# katex: //cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css
# copy_tex_js: //unpkg.com/katex@0/dist/contrib/copy-tex.min.js
# copy_tex_css: //unpkg.com/katex@0/dist/contrib/copy-tex.min.css
katex:
copy_tex_js:
copy_tex_css:
# Recommended version: 0.4.0
pjax: //cdn.jsdelivr.net/gh/next-theme/pjax@0/pjax.min.js
#pjax:
# FancyBox
# jquery: //unpkg.com/jquery@3/dist/jquery.min.js
# fancybox: //unpkg.com/@fancyapps/fancybox@3/dist/jquery.fancybox.min.js
# fancybox_css: //unpkg.com/@fancyapps/fancybox@3/dist/jquery.fancybox.min.css
jquery:
fancybox:
fancybox_css:
# Medium-zoom
# mediumzoom: //unpkg.com/medium-zoom@1/dist/medium-zoom.min.js
# mediumzoom: //cdnjs.cloudflare.com/ajax/libs/medium-zoom/1.0.5/medium-zoom.min.js
mediumzoom:
# Lazyload
lazyload: //cdn.jsdelivr.net/npm/lozad@1/dist/lozad.min.js
# lazyload: //cdnjs.cloudflare.com/ajax/libs/lozad.js/1.15.0/lozad.min.js
#lazyload:
# Pangu
pangu: //cdn.jsdelivr.net/npm/pangu@4/dist/browser/pangu.min.js
# pangu: //cdnjs.cloudflare.com/ajax/libs/pangu/4.0.7/pangu.min.js
#pangu:
# Quicklink
# quicklink: //unpkg.com/quicklink@2/dist/quicklink.umd.js
# quicklink: //cdnjs.cloudflare.com/ajax/libs/quicklink/2.0.0/quicklink.umd.js
quicklink:
# DisqusJS
# disqusjs_js: //unpkg.com/disqusjs@1/dist/disqus.js
# disqusjs_css: //unpkg.com/disqusjs@1/dist/disqusjs.css
disqusjs_js:
disqusjs_css:
# Valine
# valine: //unpkg.com/valine@1/dist/Valine.min.js
# valine: //cdnjs.cloudflare.com/ajax/libs/valine/1.4.14/Valine.min.js
valine:
# Gitalk
gitalk_js: //cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js
gitalk_css: //cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.css
#gitalk_js:
#gitalk_css:
# Algolia Search
algolia_search: //cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js
instant_search: //cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js
#algolia_search:
#instant_search:
# Mermaid
# mermaid: //unpkg.com/mermaid@8/dist/mermaid.min.js
# mermaid: //cdnjs.cloudflare.com/ajax/libs/mermaid/8.5.2/mermaid.min.js
mermaid:
# Internal version: 1.2.1
velocity: //cdn.jsdelivr.net/npm/velocity-animate@1/velocity.min.js
# velocity: //cdnjs.cloudflare.com/ajax/libs/velocity/1.2.1/velocity.min.js
velocity_ui: //cdn.jsdelivr.net/npm/velocity-animate@1/velocity.ui.min.js
# velocity_ui: //cdnjs.cloudflare.com/ajax/libs/velocity/1.2.1/velocity.ui.min.js
#velocity:
#velocity_ui:
# Internal version: 1.0.2
pace: //cdn.jsdelivr.net/npm/pace-js@1/pace.min.js
# pace: //cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js
pace_css: //cdn.jsdelivr.net/npm/pace-js@1/themes/blue/pace-theme-minimal.css
# pace_css: //cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/themes/blue/pace-theme-minimal.min.css
#pace:
#pace_css:
# JavaScript 3D library
# three: //unpkg.com/three@0/build/three.min.js
# three_waves: //cdn.jsdelivr.net/gh/next-theme/theme-next-three@1/three-waves.min.js
# canvas_lines: //cdn.jsdelivr.net/gh/next-theme/theme-next-three@1/canvas_lines.min.js
# canvas_sphere: //cdn.jsdelivr.net/gh/next-theme/theme-next-three@1/canvas_sphere.min.js
three:
three_waves:
canvas_lines:
canvas_sphere:
# Canvas ribbon
# canvas_ribbon: //unpkg.com/ribbon.js@1/dist/ribbon.min.js
canvas_ribbon:
# Assets
css: css
js: js
images: images
styles.styl
.pace .pace-progress {
background: var(--text-color) !important;
}
.logo-line-before, .logo-line-after {
height: 10px;
display: none;
}
.menu .menu-item a {
border-radius: 0px !important;
}
.posts-expand .post-body img {
margin: auto;
}
.gt-comments-null {
display: none;
}
.gt-container .gt-popup {
background: var(--body-bg-color) !important;
}
.gt-container .gt-btn {
border: none !important;
}
.gt-container .gt-link {
border-bottom: 1px dotted var(--link-color) !important;
}
.gt-container .gt-svg svg {
fill: var(--link-color) !important;
}
.gt-container .gt-svg svg:hover {
fill: var(--link-hover-color) !important;
}
.gt-container .gt-header-controls .gt-btn {
background: var(--card-bg-color) !important;
color: var(--text-color) !important;
}
.gt-container a {
color: var(--link-color) !important;
}
.gt-container a:hover {
color: var(--link-hover-color) !important;
}
.gt-container .gt-comment-content {
background-color: var(--card-bg-color) !important;
color: var(--text-color) !important;
}
.gt-container .gt-comment-content:hover {
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.gt-comment-body.markdown-body p {
color: var(--text-color) !important;
}
.gt-container .gt-header-preview,
.gt-container .gt-header-textarea {
background-color: var(--card-bg-color) !important;
color: var(--text-color) !important;
border: 0px !important;
}
.gt-container .gt-header-textarea::placeholder {
color: #a1a1a1 !important;
}
.gt-container .gt-avatar img,
.gt-container .gt-btn,
.gt-container .gt-header-preview {
border-radius: 0px !important;
}
.gt-container .gt-header-textarea,
.gt-container .gt-header-textarea:hover {
border-radius: 0px !important;
background-color: #FFF;
}
.gt-container .gt-popup .gt-action-sortasc.is--active,
.gt-container .gt-popup .gt-action-sortdesc.is--active {
color: #333 !important;
}
.gt-container .gt-popup .gt-action.is--active:before {
background: var(--text-color) !important;
}
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
Set the placeholder configuration item through front-matter on different pages to display different comment box placeholders.
The comment box placeholders on all pages can only read theme.valine.placeholder
configuration item.
I checked the bodyEnd injection point in the code next/scripts/filters/comment/valine.js
:
hexo.extend.filter.register('theme_inject', injects => {
let theme = hexo.theme.config;
if (!theme.valine.enable || !theme.valine.appId || !theme.valine.appKey) return;
injects.comment.raw('valine', '<div class="comments" id="valine-comments"></div>', {}, {cache: true});
injects.bodyEnd.file('valine', path.join(hexo.theme_dir, 'layout/_third-party/comments/valine.njk'));
});
and next/layout/_third-party/comments/valine.njk
:
<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
NexT.utils.getScript('{{ valine_uri }}', () => {
new Valine(Object.assign({
el : '#valine-comments',
path : location.pathname,
}, {{ theme.valine | json }}
));
}, window.Valine);
});
</script>
At present, only the placeholder
configuration item in theme.valine
is read.
Can it be supported to read front-matter in the future?
Or any other method that does not modify the original source code of the theme to achieve it?
Many thanks.
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
根据目前需求,只在文章页面(posts)设置分享按钮,其他页面不设置分享按钮。
因此将原本位于footer.njk
的代码
{%- if theme.add_this_id %}
<div class="addthis_inline_share_toolbox">
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ theme.add_this_id }}" async="async"></script>
</div>
{%- endif %}
移动到了post/post-footer.njk
。
在网站部署好之后访问页面,点击Addthis的分享按钮,分享出去的链接再点击,显示404页面。
注意到分享生成的链接是斜杠后面跟了一串参数。
github和gitee均有此故障。
_config.yml
里面添加AddThis的ID。footer.njk
的代码{%- if theme.add_this_id %}
<div class="addthis_inline_share_toolbox">
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ theme.add_this_id }}" async="async"></script>
</div>
{%- endif %}
移到post/post-footer.njk
。
3. 部署到网站。
4. 访问任意一个文章,点击任一Addthis分享按钮。按照页面提示分享出去。
5. 点击分享的链接,显示404。
v10.16.0
6.9.0
[email protected] D:\wwwroot\cms_source
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: "No.5972 Publishment Website"
subtitle: ''
description: 'No.5972 is silly B'
keywords:
author: No.5972
language: en
timezone: ''
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://no5972.github.io
root: /cms/
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## Use post's date for updated date unless set in front-matter
use_date_for_updated: false
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Search
search:
path: search.xml
field: post
format: html
limit: 10000
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo:
github: [email protected]:No5972/cms.git,master
gitee: [email protected]:No5972/cms.git,master
# AddThis Share. See: https://www.addthis.com
# Go to https://www.addthis.com/dashboard to customize your tools.
add_this_id: ra-5f1fe0947c0fa73a
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
If the markdown file was updated, the article can show the update time basing file modified time as default.
我克隆了这个节点的主题
https://github.com/next-theme/hexo-theme-next/tree/8a5643b2203fbff580bc40a0f6c57c9ecf7345d5
之后我升级到了
https://github.com/next-theme/hexo-theme-next/tree/3aa2a210682f275eaa8d33a394b0fa9cf14a25e4
https://5eefa08f60f39b00096ae80c--leicancun.netlify.app/
点击任意链接可正常加载
https://5eefaead2b8cab00077c7bee--leicancun.netlify.app/
仅有首次点击可正常查看内容之后点击任意链接看不到文章等内容,必须手动F5刷新才能正常显示
npm v6.14.4
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
https://github.com/theme-next/hexo-next-title/tree/c088c8e8accc46b24210015a88ccfb1099a33403
if (NexT.utils.hasMobileUA()) return;
error:
Uncaught TypeError: NexT.utils.hasMobileUA is not a function
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
$ npx hexo n openstack-volume
INFO Created: ~\Jetbrains\IdeaProjects\caoyu.info\cc\source\_posts\openstack-volume.md
$ npx hexo n openstack-volume
INFO ==================================
███╗ ██╗███████╗██╗ ██╗████████╗
████╗ ██║██╔════╝╚██╗██╔╝╚══██╔══╝
██╔██╗ ██║█████╗ ╚███╔╝ ██║
██║╚██╗██║██╔══╝ ██╔██╗ ██║
██║ ╚████║███████╗██╔╝ ██╗ ██║
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝
========================================
NexT version 8.0.0-rc.4
Documentation: https://theme-next.js.org
========================================
INFO Created: ~\Jetbrains\IdeaProjects\caoyu.info\cc\source\_posts\openstack-volume.md
$ npx hexo n openstack-volume
$ node -v && npm -v
v14.5.0
6.14.5
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
希望能够支持hexo-algoliasearch,该插件可以支持部分文章内容搜索,而且最近也一直在更新,hexo-algolia已经很久不更新了,而且只支持标题索引。
希望可以像 local_search 一样显示文章内容的摘要。
$ hexo s
INFO Start processing
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
TypeError: Cannot read property 'enable' of undefined
at Hexo.logic (E:\hexo\node_modules\hexo-abbrlink\lib\logic.js:59:44)
at Hexo.tryCatcher (E:\hexo\node_modules\bluebird\js\release\util.js:16:23)
at Hexo.<anonymous> (E:\hexo\node_modules\bluebird\js\release\method.js:15:34)
at E:\hexo\node_modules\hexo\lib\extend\filter.js:62:52
at tryCatcher (E:\hexo\node_modules\bluebird\js\release\util.js:16:23)
at Object.gotValue (E:\hexo\node_modules\bluebird\js\release\reduce.js:166:18)
at Object.gotAccum (E:\hexo\node_modules\bluebird\js\release\reduce.js:155:25)
at Object.tryCatcher (E:\hexo\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (E:\hexo\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (E:\hexo\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (E:\hexo\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (E:\hexo\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (E:\hexo\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (E:\hexo\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (E:\hexo\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (E:\hexo\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:456:21)
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
更改主题
我不知道该如何去重现他
Windows 7; Chrome 84.0.4147.105 (正式版本)
$ node -v && npm -v
v12.16.1
6.13.4
$ npm ls --depth 0
[email protected] E:\Blog
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: GoldenHuaji
subtitle: ''
description: ''
keywords:
author: GoldenHuaji
language: zh-Hans
timezone: ''
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://GoldenHuaji.github.io/
root: /
permalink: :title/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
prismjs:
enable: false
preprocess: true
line_number: true
tab_replace: ''
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports 'mtime', 'date', 'empty'
updated_option: 'mtime'
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
# theme: landscape
theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo: ssh://[email protected]/GoldenHuaji/GoldenHuaji.github.io.git
branch: master
# ---------------------------------------------------------------
# Scheme Settings
# ---------------------------------------------------------------
# Schemes
# scheme: Mist
# scheme: Muse
# scheme: Pisces
scheme: Gemini
menu:
home: / || fa fa-home
tags: /tags/ || fa fa-tags
#categories: /categories/ || fa fa-th
archives: /archives/ || fa fa-archive
#schedule: /schedule/ || fa fa-calendar
#sitemap: /sitemap.xml || fa fa-sitemap
#commonweal: /404/ || fa fa-heartbeat
about: /about/ || fa fa-user
social:
GitHub: https://github.com/GoldenHuaji || fab fa-github
Weibo: https://weibo.com/6986004843 || fab fa-weibo
#Google: https://plus.google.com/yourname || fab fa-google
Twitter: https://twitter.com/db35009959 || fab fa-twitter
E-Mail: mailto:[email protected] || fa fa-envelope
#FB Page: https://www.facebook.com/yourname || fab fa-facebook
#StackOverflow: https://stackoverflow.com/yourname || fab fa-stack-overflow
#YouTube: https://youtube.com/yourname || fab fa-youtube
#Instagram: https://instagram.com/yourname || fab fa-instagram
#Skype: skype:yourname?call|chat || fab fa-skype
social_icons:
enable: true
icons_only: false
transition: false
Github: github
Twitter: twitter
Weibo: weibo
E-Mail: google
disqus:
enable: true
shortname: goldenhuaji
count: true
#post_meta_order: 0
Windows 7; Chrome 84.0.4147.105 (正式版本)
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
使用hexo clean
清除缓存
执行hexo clean
报错
ERROR {
err: /home/editing/hexo-source/node_modules/hexo-theme-next/package.json:2
"_from": "hexo-theme-next@^8.0.0-rc.5",
^
SyntaxError: Unexpected token ':'
at new Script (vm.js:88:7)
at createScript (vm.js:263:10)
at runInThisContext (vm.js:311:10)
at /home/editing/hexo-source/node_modules/hexo/lib/hexo/index.js:313:18
at tryCatcher (/home/editing/hexo-source/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/editing/hexo-source/node_modules/bluebird/js/release/promise.js:517:31)
at Promise._settlePromise (/home/editing/hexo-source/node_modules/bluebird/js/release/promise.js:574:18)
at Promise._settlePromise0 (/home/editing/hexo-source/node_modules/bluebird/js/release/promise.js:619:10)
at Promise._settlePromises (/home/editing/hexo-source/node_modules/bluebird/js/release/promise.js:699:18)
at _drainQueueStep (/home/editing/hexo-source/node_modules/bluebird/js/release/async.js:138:12)
at _drainQueue (/home/editing/hexo-source/node_modules/bluebird/js/release/async.js:131:9)
at Async._drainQueues (/home/editing/hexo-source/node_modules/bluebird/js/release/async.js:147:5)
at Immediate.Async.drainQueues [as _onImmediate] (/home/editing/hexo-source/node_modules/bluebird/js/release/async.js:17:14)
at processImmediate (internal/timers.js:456:21)
} Plugin load failed: %s hexo-theme-next
hexo clean
v12.18.0
6.14.7
[email protected] /home/editing/hexo-source
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
开启valine的评论功能,将语言设置为英文,然后文章评论区的界面应该显示为英文界面。
language
属性为en
之后启动服务器发现界面语言没有发生变化。lang
。于是将主题配置文件_config.yml
中valine
的language
属性名称改为lang
,再重新启动服务器,界面成功变为英文。valine
的enable
设为true
,设置appId
和appKey
。valine
的language
值设为en
。启动服务器,文章界面语言没有改变。valine
的language
名称改成lang
。重新启动服务器,文章界面语言才变成英文。v10.16.0
6.9.0
[email protected] D:\wwwroot\cms_source
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: "No.5972 Publishment Website"
subtitle: ''
description: 'No.5972 is silly B'
keywords:
author: No.5972
language: en
i18n:
type:
- page
- post
generator:
- index
- archive
- category
timezone: ''
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://no5972.github.io/cms
root: /cms/
permalink: :title.html
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render: 404.html
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## Use post's date for updated date unless set in front-matter
use_date_for_updated: false
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Search
search:
path: search.xml
field: post
format: html
limit: 10000
# Extensions
## Plugins: https://hexo.io/plugins/
plugins:
hexo-generator-feed
# Feed Atom
feed:
type: atom
path: feed.xml
limit: 65536
## Themes: https://hexo.io/themes/
theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo:
github: [email protected]:No5972/cms.git,master
gitee: [email protected]:No5972/cms.git,master
# Valine
# For more information: https://valine.js.org, https://github.com/xCss/Valine
valine:
enable: true
appId: nOdccOqHtNBWpnoqXaBLw5Og-MdYXbMMI # Your leancloud application appid
appKey: tYz6qEF31fk2WBHYsyO8RHQP # Your leancloud application appkey
placeholder: Just go go # Comment box placeholder
avatar: mm # Gravatar style
meta: [nick, mail, link] # Custom comment header
pageSize: 10 # Pagination size
language: en # Language, available values: en, zh-cn
visitor: false # Article reading statistic
comment_count: true # If false, comment count will only be displayed in post page, not in home page
recordIP: false # Whether to record the commenter IP
serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
#post_meta_order: 0
可以考虑把lang和language两个属性都写到这个配置里面,valine高版本和低版本都可以读取到。
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
I enable the jsdelivr CDN config and expect every script uses jsdelivr.
vendors:
internal: jsdelivr
plugins: jsdelivr
However, only anime and font-awesome do not enable CDN successfully.
<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
<script src="/lib/anime.min.js">
See above.
v14.6.0
6.14.6
[email protected] /home/jz748/codes/njzjz.github.io
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Jinzhe Zeng's Blog
subtitle: 苟利国家生死以,岂因祸福避趋之
description: PhD student at Rutgers University
keywords: Jinzhe Zeng Blog
author: Jinzhe Zeng
language:
- en
- zh-CN
timezone: Asia/Shanghai
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://njzjz.win
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
- 404.html
- cv/*.html
- redirect/*
- now.json
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: true
tab_replace: true
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ""
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo: https://github.com/njzjz/njzjz.github.io
branch: master
all_minifier: true
#autoissue
owner: njzjz-bot
comment_repo: njzjz.github.io
labels: ["Gitalk"]
sitemap:
path: sitemap.xml
index2_generator:
- layout: "archive"
path: "archives"
exclude:
- category ECNUChemistry
- category Internship
- layout: "index"
path: ""
index: true
exclude:
- category ECNUChemistry
- category Internship
symbols_count_time:
symbols: true
time: true
total_symbols: true
total_time: true
exclude_codeblock: false
search:
path: search.xml
field: post
content: true
cdn_server: https://img.njzjz.win
cdn_use_webp: true
minify: true
darkmode: true
language_switcher: true
cache:
enable: false
favicon:
small: https://img.njzjz.win/?url=avatars2.githubusercontent.com/u/9496702?s=460&v=4
medium: https://img.njzjz.win/?url=avatars2.githubusercontent.com/u/9496702?s=460&v=4
apple_touch_icon: https://img.njzjz.win/?url=avatars2.githubusercontent.com/u/9496702?s=460&v=4
safari_pinned_tab: https://img.njzjz.win/?url=avatars2.githubusercontent.com/u/9496702?s=460&v=4
footer:
since: 2016
icon:
animated: true
creative_commons:
sidebar: true
post: true
scheme: Gemini
menu:
home: / || fa fa-home
cv: /cv/ || fas fa-file
softwares: /softwares/ || fab fa-app-store
categories: /categories/ || fa fa-th
archives: /archives/ || fa fa-archive
menu_settings:
badges: true
avatar:
url: https://img.njzjz.win/?url=avatars2.githubusercontent.com/u/9496702?s=460&v=4
social:
GitHub: https://github.com/njzjz || fab fa-github
E-Mail: mailto:[email protected] || fa fa-envelope
ORCID: https://orcid.org/0000-0002-1515-8172 || fab fa-orcid
Scholar: https://scholar.google.com/citations?user=P7gRtg4AAAAJ || fab fa-google
ResearchGate: https://www.researchgate.net/profile/Jinzhe_Zeng || fab fa-researchgate
Twitter: https://twitter.com/njzjz || fab fa-twitter
Zhihu: https://www.zhihu.com/people/zeng-jin-zhe || fab fa-zhihu
Weibo: https://weibo.com/njzjz || fab fa-weibo
follow_me:
Twitter: https://twitter.com/njzjz || twitter
WeChat: https://img.njzjz.win/?url=open.weixin.qq.com/qr/code?username=gh_c3cec7062858 || wechat
reward_settings:
enable: true
animation: true
mobile_layout_economy: true
pjax: true
mediumzoom: true
pangu: true
quicklink:
enable: true
home: true
archive: true
motion:
enable: false
async: true
reward:
wechatpay: https://img.njzjz.win/?url=i.loli.net/2018/08/26/5b821ce3a2497.jpg
alipay: https://img.njzjz.win/?url=i.loli.net/2018/08/26/5b821c8f752b4.png
related_posts:
enable: true
post_edit:
enable: true
url: https://github.com/njzjz/njzjz.github.io/tree/hexo/source/ # Link for view source.
codeblock:
copy_button:
enable: true
show_result: true
reading_progress:
enable: true
bookmark:
enable: true
github_banner:
enable: true
permalink: https://github.com/njzjz/njzjz.github.io
seo: true
index_with_subtitle: true
exturl: true
baidu_push: true
math:
enable: true
comments:
lazyload: true
valine:
enable: true
appId: YMI6904uVYbYEvp2Q0MtJc8n-MdYXbMMI
appKey: hY1CYIauaeAmQe75EmPUFgN0
notify: true
visitor: true
recordIP: true
enableQQ: true
serverURLs: https://blogcomment.njzjz.win
google_analytics:
tracking_id: UA-74033886-1
local_search:
enable: true
pdf:
enable: true
links_settings:
icon: fa fa-link
title: Friend Links
layout: block
links:
"Darrin York Group": http://theory.rutgers.edu/profile.php?people_id=230
"Tong Zhu Group": https://computchem.cn/people
"hexi blog": https://hexi519.github.io
vendors:
internal: jsdelivr
plugins: jsdelivr
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
next8.x与插件hexo-enhancer兼容
next7.x与插件hexo-enhancer兼容
next8.x与插件hexo-enhancer不兼容
使用next主题并且安装hexo-enhancer插件,然后运行hexo clean && hexo g && hexo s
v12.18.2
6.14.5
[email protected] E:\Hexo
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
希望能解决这个问题,这个插件还挺好用的,结果因为不兼容不能用了,太可惜了!
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
主题配置文件 _config.yml
# Vanilla JavaScript plugin for lazyloading images.
# For more information: https://github.com/ApoorvSaxena/lozad.js
lazyload: false
功能失效,安装插件,启用,经测试显示空白!!建议取消,原插件三年没维护了。
或是使用 https://github.com/Troy-Yang/hexo-lazyload-image
使用Hexo和NexT的default 配置文件,按照NexT官方文档对pandoc进行配置后,公式可以正常显示,但是出现了如下问题,该问题提问在https://github.com/wzpan/hexo-renderer-pandoc/issues/39:
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
今天更新了文章,进行预览的时候发现博客中有部分文章渲染失败:
点击进入文章,部分文章渲染失败,原页面刷新可正常显示。返回首页后再进入文章,依然渲染失败,显示空白!
但仍有部分文章可以正常显示(在清理过缓存的情况,和调试模式禁用缓存的情况下,部分文章仍然可以正常渲染,部分文章无法渲染)
该问题呈现于 Windows 谷歌浏览器 版本 83.0.4103.7(正式版本) (64 位)
Windows 谷歌浏览器版本 83.0.4103.116(正式版本) (64 位)
火狐浏览器及手机Safari表现正常。
文件配置可参考:#46 (comment)
博客地址:https://blog.juanertu.com/
请问可能的原因是?
请问 linkgrid 是哪个版本加入的特性?我使用这个 tag,发现并没有效果。我的版本如下:
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
$ npm install -g hexo-cli
$ hexo init test
$ cd test
$ npm install
$ git init
$ git submodule add https://github.com/next-theme/hexo-theme-next themes/next
Modify hexo config test/_config.yml
as follows:
...
relative_link: false
future: true
highlight:
- enable: true
+ enable: false
line_number: true
auto_detect: false
tab_replace: ''
...
+prismjs:
+ enable: true
...
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
-theme: landscape
+theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
...
v12.14.1
6.14.5
[email protected] /home/parallels/Desktop/hexo/test
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Hexo
subtitle: ''
description: ''
keywords:
author: John Doe
language: en
timezone: ''
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: false
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
prismjs:
enable: true
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## Use post's date for updated date unless set in front-matter
use_date_for_updated: false
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: ''
Unmodified
It's a copy of _config.yml
Has been tested on the following platforms:
Prism.js
:使用非Prism原生主题(Prism additional themes),会提示找不到依赖,需要手动添加prism-themes
包*err: Error: Cannot find module 'prism-themes/package.json'
Prism.js
:copy_button
无法显示,切回highlight.js
后正常Animate.css
:启用async
选项后,post_header
及post_body
会依次在post_block
后出现,按我的理解应该是这三者同时出现,请问这是bug还是feature?Animate.css
:在设置vendors.internal=jsdelivr
后,/lib/animate-css/animate.min.css
仍从本地载入Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
Every time "deploy" will make the following error. I don't know what caused it.Maybe the reason for my poor English is that I did not find the relevant issue
![image](https://user-images.githubusercontent.com/49091147/83480228-56384280-a4cd-11ea-9152-2bd26fd4170c.png)
![image](https://user-images.githubusercontent.com/49091147/83480282-71a34d80-a4cd-11ea-8b78-82e2e8b83849.png)
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Rsweater's Blog
subtitle: '最好的状态来源于好的作息!最高的效率来源于好的资源配置!'
description: '这里有Python、GIS相关的小笔记!'
keywords: Python GiS GDAL 爬虫 数据分析 机器学习 日常笔记
author: 一线毛衣
language: zh-CN
timezone: 'Asia/Shanghai'
# URL
url: https://bwchen1223.xyz
root: /
## 文章 永久链接 格式
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
trailing_index: true # 是否在永久链接中保留尾部的 index.html
trailing_html: true # 是否在永久链接中保留尾部的 .html
# Directory
source_dir: source # 资源文件夹,用来存放内容
public_dir: public # 公共文件夹,用来存放生成的站点信息
tag_dir: tags # 标签文件加
archive_dir: archives # 归档文件夹
category_dir: categories # 分类文件夹
code_dir: downloads/code # Include code 文件夹,source_dir 下的子目录
i18n_dir: :lang # 国际化(i18n)文件夹
skip_render:
# 跳过指定文件的渲染。匹配到的文件将会被不做改动地复制到 public 目录中。
# 您可使用 glob 表达式来匹配路径。
# 例如:
# skip_render: "mypage/**/*"
# # 将会直接将 `source/mypage/index.html` 和 `source/mypage/code.js` 不做改动地输出到 'public' 目录
# # 你也可以用这种方法来跳过对指定文章文件的渲染
# skip_render: "_posts/test-post.md"
# # 这将会忽略对 'test-post.md' 的渲染
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # 把标题转换为 title case
external_link:
enable: true # Open external links in new tab/在新标签中打开链接
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false # 显示草稿
post_asset_folder: false # 启动Asset文件夹
relative_link: false # 把链接改为与根目录的相对位址
future: true # 显示未来的文章
highlight: # 代码块设置
enable: true # 高亮
line_number: true # 显示行数
auto_detect: false # 如果未指定语言,则启用自动检测
tab_replace: '' # 用N个空格代替tabs,如果值为空,则不会替换
wrap: true # Wrap the code block in <table>
hljs: false # Use the hljs-* prefix for CSS classes
# Home page setting(分页)
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 5
order_by: -date
# Category & Tag
default_category: uncategorized
category_map: # 分类别名
tag_map: # 标签别名
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## Use post's date for updated date unless set in front-matter
use_date_for_updated: false
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next
plugins:
- hexo-abbrlink
- hexo-deployer-git
- hexo-filter-flowchart
- hexo-generator-archive
- hexo-generator-baidu-sitemap
- hexo-generator-category
- hexo-generator-feed
- hexo-generator-index
- hexo-generator-json-content
- hexo-generator-searchdb
- hexo-generator-sitemap
- hexo-generator-tag
- hexo-helper-qrcode
- hexo-related-popular-posts
- hexo-renderer-ejs
- hexo-renderer-less
- hexo-renderer-markdown-it-plus
- hexo-renderer-marked
- hexo-renderer-pandoc
- hexo-renderer-stylus
- hexo-server
- hexo-symbols-count-time
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo:
github: [email protected]:Rsweater/Rsweater.github.io.git
# gitee: [email protected]:Rsweater_admin/Rsweater.github.io.git
coding: https://e.coding.net/rsweater/rsweater.git
branch: master
# hexo-admin authentification
admin:
username: 一线毛衣
password_hash: $2a$10$zC7a1xncVJumV9Ny/x01TunWI18j7UUt03Oj3.QzfypiBmFj2QZbC
secret: bw_chen
deployCommand: 'hexo-publish.bat'
search:
path: search.xml
field: post
content: true
format: html
# 添加站点地图sitemap
sitemap:
path: sitemap.xml
baidusitemap:
path: baidusitemap.xml
Emmm, today it's a new next. Do you want it all?I'll post it if I need to. The error seems to be related to '.git'.
chrome, win10,
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
今天升级 next,从 v8.0.0-rc.3
升级到 v8.0.0-rc.5
(或 v8.0.0-rc.4
)存在如下问题(以 Muse 为例):
这在 v8.0.0-rc.3
中显示正常,可参考:v8.0.0-rc.3 测试
v8.0.0-rc.3
中显示正常。这在 v8.0.0-rc.3
中显示正常:
meta
项参数值无效。例如:
valine:
...
meta: [nick, link]
...
这仍会在页面显示 “邮箱” 相关项。
我不太确定以上问题是否为预期行为?
Everything should works well and no error will be encountered.
I deploy the same blog to github pages and gitee pages.
In https://pan64271.github.io, everything works well.
But when I access https://pan64271.gitee.io, only a blank was shown:
Besides, two errors are shown:
I read this issue #41 and it seems like that Velocity.js is no longer used? (I don't know too much about Web)
So, does it mean that I cannot deploy this in gitee?
v14.7.0
6.14.7
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected] (github:theme-next/theme-next-calendar#4de1d42ae3fff83a1aaae5d4f01ffc29444e4222)
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected] (github:theme-next/hexo-next-utteranc#f592272a73cb47923f25443709786942f0398a69)
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: pan64271的博客
subtitle: '未经审视的人生,是不值得过的。——苏格拉底'
description: ''
keywords:
author: pan64271
language: zh-CN
timezone: ''
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://pan64271.github.io
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
prismjs:
enable: false
preprocess: true
line_number: true
tab_replace: ''
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports 'mtime', 'date', 'empty'
updated_option: 'mtime'
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
- type: git
repository: [email protected]:pan64271/pan64271.github.io.git
branch: master
- type: git
repository: [email protected]:pan64271/pan64271.git
branch: master
# Activate math-render
math:
engine: 'katex'
mathjax:
# src: custom_mathjax_source
config:
# MathJax config
# Search
search:
path: search.xml
field: post
format: html
limit: 10000
# Auto generate sitmap
sitemap:
path: sitemap.xml
baidusitemap:
path: baidusitemap.xml
# RSS Feed
feed:
type: atom
path: atom.xml
limit: 20
hub:
content:
content_limit: 140
content_limit_delim: " "
order_by: -date
icon: icon.png
# Excerpt the posts in homepage
excerpt:
depth: 3
excerpt_excludes: []
more_excludes: []
hideWholePostExcerpts: true
creative_commons:
license: by-nc-sa
sidebar: false
post: true
language:
# Schemes
#scheme: Muse
#scheme: Mist
#scheme: Pisces
scheme: Gemini
# Dark Mode
darkmode: true
menu:
home: / || fa fa-home
about: /about/ || fa fa-user
tags: /tags/ || fa fa-tags
categories: /categories/ || fa fa-th
archives: /archives/ || fa fa-archive
#schedule: /schedule/ || fa fa-calendar
#sitemap: /sitemap.xml || fa fa-sitemap
#commonweal: /404/ || fa fa-heartbeat
avatar:
# Replace the default image and set the url here.
url: /images/avatar_Work.jpg
# If true, the avatar will be dispalyed in circle.
rounded: false
# If true, the avatar will be rotated with the cursor.
rotated: false
social:
GitHub: https://github.com/pan64271 || fab fa-github
E-Mail: mailto:[email protected] || fa fa-envelope
#Weibo: https://weibo.com/yourname || fab fa-weibo
#Google: https://plus.google.com/yourname || fab fa-google
#Twitter: https://twitter.com/yourname || fab fa-twitter
#FB Page: https://www.facebook.com/yourname || fab fa-facebook
#StackOverflow: https://stackoverflow.com/yourname || fab fa-stack-overflow
#YouTube: https://youtube.com/yourname || fab fa-youtube
#Instagram: https://instagram.com/yourname || fab fa-instagram
#Skype: skype:yourname?call|chat || fab fa-skype
links:
华南师大搬砖技术社区: https://0xffff.one/
ziwen`s blog: http://www.ziwenblog.xyz/
follow_me:
#Twitter: https://twitter.com/username || fab fa-twitter
#Telegram: https://t.me/channel_name || fab fa-telegram
#WeChat: /images/wechat_channel.jpg || fab fa-weixin
RSS: /atom.xml || fa fa-rss
codeblock:
# Code Highlight theme
# All available themes: https://theme-next.js.org/highlight/
theme:
light: default
dark: tomorrow-night
prism:
light: prism
dark: prism-dark
# Add copy button on codeblock
copy_button:
enable: true
# Available values: default | flat | mac
style:
back2top:
enable: true
# Back to top in sidebar.
sidebar: false
# Scroll percent label in b2t button.
scrollpercent: true
math:
# Default (true) will load mathjax / katex script on demand.
# That is it only render those page which has `mathjax: true` in Front-matter.
# If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
per_page: true
# hexo-renderer-pandoc (or hexo-renderer-kramed) required for full MathJax support.
mathjax:
enable: true
# hexo-renderer-markdown-it-plus (or hexo-renderer-markdown-it with markdown-it-katex plugin) required for full Katex support.
katex:
enable: true
# See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
copy_tex: false
busuanzi_count:
enable: true
total_visitors: true
total_visitors_icon: fa fa-user
total_views: true
total_views_icon: fa fa-eye
post_views: true
post_views_icon: fa fa-eye
local_search:
enable: true
# If auto, trigger search by changing input.
# If manual, trigger search by pressing enter key or search button.
trigger: auto
# Show top n results per article, show all results by setting to -1
top_n_per_article: 1
# Unescape html strings to the readable one.
unescape: false
# Preload the search data when the page loads.
preload: false
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
配置如下variables.styl,侧边栏顶栏应显示为圆角
source/_data/variables.styl
$border-radius-inner = 20px 20px 20px 20px;
$border-radius = 20px;
使用 next v7.8.0 能正常显示为圆角
v10.20.1
6.14.4
[email protected] /home/zc/repo/zc/ilyydy.github.io
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: 野草
subtitle: ''
description: 目的虽有,道路却无;我们所称之为路的,无非是踌躇
keywords:
author: 张生
language: zh-CN
timezone: Asia/Shanghai
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://ilyydy.github.io/
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
auto_spacing: false
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## Use post's date for updated date unless set in front-matter
use_date_for_updated: false
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
#对应仓库的SSH地址(可以在GitHub对应的仓库中复制)
repo: [email protected]:ilyydy/ilyydy.github.io.git
#(分支:User Pages为master,Project Pages为gh-pages)
branch: master
feed:
type: atom
path: atom.xml
limit: 20
hub:
content:
content_limit: 140
content_limit_delim: ' '
order_by: -date
icon: icon.png
autodiscovery: true
template:
nofollow:
enable: true
field: site
exclude:
- 'exclude1.com'
- 'exclude2.com'
search:
path: search.xml
field: post
format: html
limit: 100
moon_menu:
back2top:
enable: true
icon: fa fa-chevron-up
func: back2top
order: -1
back2bottom:
enable: true
icon: fa fa-chevron-down
func: back2bottom
order: -2
sitemap:
path: sitemap.xml
scheme: Gemini
custom_file_path:
#head: source/_data/head.njk
#header: source/_data/header.njk
#sidebar: source/_data/sidebar.njk
#postMeta: source/_data/post-meta.njk
#postBodyEnd: source/_data/post-body-end.njk
#footer: source/_data/footer.njk
#bodyEnd: source/_data/body-end.njk
variable: source/_data/variables.styl
#mixin: source/_data/mixins.styl
style: source/_data/styles.styl
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
Execute hexo clean
without error
hexo init test
cd test
npm install
npm install hexo-theme-next
sed -i 's/theme: landscape/theme: next/g' _config.yml
cp node_modules/hexo-theme-next/_config.yml _config.next.yml
hexo clean
v12.18.3
6.14.6
[email protected] /root/test
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
-theme: landscape
+theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
npm install gulp gulp-shell
By installing gulp
and gulp-shell
manually, there is no error prompt after executing hexo clean
.
After install hexo new theme and run hexo s command ,the page can not show anything except website title and back top,what should I do.
Note that I was install theme redirectly.
Verify the configuration file of the theme, when our configuration changes, or the user fills in the wrong content, wecan remind the user to modify.
I try to use ajv check
yarn add hexo-theme-cake
# modify `theme` to `cake`
# exec check. see impl: https://github.com/jiangtj/hexo-theme-cake/blob/master/lib/console/check.js
hexo check
But the problem is that we need to maintain a huge json-schema. Even the compressed next theme (cake), config file line about 140. The schema has 276 lines. schema.json. The schema has 160 lines. schema.yml.
Do you think? @stevenjoezhang
When I fill in a wrong value
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
正常工作
Tabs 和 linkgrid 无法同时工作,linkgrid 会超出 Tabs 的范围。
<!-- tab xx -->
{% lg %}
| http://localhost:4000/posts/bbe4416e.html
| http://localhost:4000/posts/d5936d3.html
{% endlg %}
<!-- endtab -->
hexo version: 3.9.0
next version: 8.0.0-rc.3
v12.18.0
6.14.4
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected] (github:theme-next/theme-next-calendar#4de1d42 ae3fff83a1aaae5d4f01ffc29444e4222)
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
# ---------------------------------------------------------------
# Theme Core Configuration Settings
# See: https://theme-next.org/docs/theme-settings/
# ---------------------------------------------------------------
custom_file_path:
head: source/_data/head.swig
footer: source/_data/footer.swig
CloudCalendar:
enable: false
language: zh-CN
single: true
root: /calendar/
calendarCdn: //cdn.jsdelivr.net/gh/theme-next/theme-next-calendar/calendar.min.js
langCdn: //cdn.jsdelivr.net/gh/theme-next/theme-next-calendar/languages.min.js
disableSidebar: true
# ---------------------------------------------------------------
# Site Information Settings
# See: https://theme-next.org/docs/getting-started/
# ---------------------------------------------------------------
footer:
since: 2019
icon:
name: heart
animated: true
color: "#ff0000"
# ---------------------------------------------------------------
# Scheme Settings
# ---------------------------------------------------------------
scheme: Pisces
darkmode: true
# ---------------------------------------------------------------
# Menu Settings
# ---------------------------------------------------------------
menu:
home: / || fa fa-home
about: /about/ || fa fa-user
常用链接: /常用链接 || fas fa-bookmark
时间线: /categories/timeline/ || iconfont icon-timeline
tags: /tags/ || fa fa-tags
博客分类:
default: /categories/ || fa fa-th
AI:
default: /AI/ || iconfont icon-rengongzhineng
dl: /dl || iconfont icon-DEEPLEARNING
ml: /ml || iconfont icon-jiqixuexi
nlp: /nlp || fas fa-hand-holding-usd
rl: /rl || iconfont icon-ReinforcementLearning
big-data: /big-data || iconfont icon-dashuju1
KG: /KG || iconfont icon-dashuju
framework: /framework || iconfont icon-kuangjia
paper: /paper || fas fa-bed
project: /project || iconfont icon-project
algorithm: /algorithm || iconfont icon-zu
timeline: /timeline/ || iconfont icon-timeline
IT-stuff:
default: /IT-stuff || iconfont icon-daimaguanli
linux: /linux || fab fa-linux
python: /python || fab fa-python
front-end: /front-end || fab fa-html5
android: /android || fab fa-android
assorted:
default: /assorted || fa fa-layer-group
conference: /conference || iconfont icon-huiyi
hexo: /hexo || iconfont icon-hexo
java:
default: /java || fab fa-java
javaee: /javaee || iconfont icon--
spring: /spring || iconfont icon-Spring
shiro: /shiro || iconfont icon-icon-test
swagger: /swagger || iconfont icon-swagger
thymeleaf: /thymeleaf || thymeleaf
other-framework: /other-framework || iconfont icon-kuangjia
archives: /archives/ || fa fa-archive
#schedule: /schedule/ || calendar
#sitemap: /sitemap.xml || fa fa-sitemap
#baidusitemap: /baidusitemap.xml || fa fa-sitemap
#commonweal: /404/ || heartbeat
menu_settings:
badges: true
# ---------------------------------------------------------------
# Sidebar Settings
# ---------------------------------------------------------------
avatar:
url: /images/avatar.jpg
rounded: true
# ---------------------------------------------------------------
# Post Settings
# See: https://theme-next.org/docs/theme-settings/posts
# ---------------------------------------------------------------
symbols_count_time:
awl: 2
wpm: 300
# ---------------------------------------------------------------
# Custom Page Settings
# See: https://theme-next.org/docs/theme-settings/custom-pages
# ---------------------------------------------------------------
tagcloud:
min: 10
max: 32
# ---------------------------------------------------------------
# Misc Theme Settings
# ---------------------------------------------------------------
codeblock:
highlight_theme: night bright
copy_button:
enable: true
show_result: true
back2top:
scrollpercent: true
reading_progress:
enable: true
# ---------------------------------------------------------------
# Third Party Plugins & Services Settings
# ---------------------------------------------------------------
math:
mathjax:
enable: true
# 此工具只支持对网站中同域名网页的预加载
quicklink:
enable: true
home: true
# ---------------------------------------------------------------
# Statistics and Analytics
# See: https://theme-next.org/docs/third-party-services/statistics-and-analytics
# ---------------------------------------------------------------
busuanzi_count:
enable: true
# ---------------------------------------------------------------
# Search Services
# See: https://theme-next.org/docs/third-party-services/search-services
# ---------------------------------------------------------------
local_search:
enable: true
# ---------------------------------------------------------------
# Tags Settings
# See: https://theme-next.org/docs/tag-plugins/
# ---------------------------------------------------------------
note:
style: flat
light_bg_offset: -10
# ---------------------------------------------------------------
# Animation Settings
# ---------------------------------------------------------------
pace:
enable: true
theme: center-atom
# ---------------------------------------------------------------
# Script Vendors.
# ---------------------------------------------------------------
# vendors:
# fontawesome: https://cdn.bootcss.com/font-awesome/5.12.1/css/all.min.css
# mathjax: //cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML
NexT v7 Roadmap theme-next/hexo-theme-next#67
NexT v7.5 Roadmap theme-next/hexo-theme-next#809
position: sticky
(theme-next/hexo-theme-next#1039 (comment), b9968b6)notes
are used in tabs
, hexo.render.renderSync
will be executed twice on the contents of notes. When using hexo-renderer-pandoc
, this will escape the html content. Relevant issue: hexojs/hexo-renderer-pandoc#39, #12 (Fixed in 17502da, ade4f44)box-shadow
of header-inner & site-brand-container overlap each other (Gemini, mobile, 402c34e):hover
not trigger on mobile (e.g. copy button), need to click twice. Use CSS any-hover
querymath.per_page
to math.every_page
(theme-next/hexo-theme-next#257, next-theme/hexo-filter-mathjax#18, a3dcac5)em
as unit, theme-next/hexo-theme-next#808 (comment))flex
layout, fc68fbe)--sidebar-wrapper-height
in pure CSS (#360)window.scrollTo
and scrollIntoView
source/js/third-party/search/local-search.js
to hexo-generator-searchdb
leancloud_counter
(theme-next/hexo-theme-next#345 (comment))next_tagcloud
helper (hexojs/hexo#4370, #58)next.yml
& Merge theme config (hexojs/hexo#4120, hexojs/hexo#4360, 817ef09)font.enable
option (theme-next/hexo-theme-next#1238 (comment))default
in sub-menu (Use loop.index
)Please feel free to leave your thought in comments (or edit this post directly if u have permissions).
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
想在浅色和深色时使用同一套 prism theme
开启 darkmode: true
关闭 highlight
开启 prismjs
highlight:
enable: false
line_number: true
auto_detect: false
tab_replace:
prismjs:
enable: true
主题配置成一样的
prism:
light: prism-xonokai
dark: prism-xonokai
主题试过 prism-hopscotch
、prism-nord
均是一样的问题。
只要将 darkmode 关了或者主题的 light、dark 设置不同,就没有问题
v14.6.0
6.14.7
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
highlight:
enable: false
line_number: true
auto_detect: false
tab_replace:
prismjs:
enable: true
# Dark Mode
darkmode: true
codeblock:
# Code Highlight theme
# All available themes: https://theme-next.js.org/highlight/
theme:
light: default
dark: tomorrow-night-eighties
prism:
light: prism-xonokai
dark: prism-xonokai
# Add copy button on codeblock
copy_button:
enable: false
# Available values: default | flat | mac
style: mac
Browser:Google Chrome 84.0.4147.89(正式版本) (64 位)
System:macOS 10.15.5
内容全部显示
v10.13.0
[email protected] /opt/blog/themes/hexo-theme-next
└── (empty)
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: **'s blog
subtitle: 生活不止眼前的苟且,还有诗和远方的田野
description: **的博客
keywords: **'s blog
author: **
language: zh
timezone:
sidebar-avatar: img/avatar.jpg
# 网站综合内容设置:
SEOTitle: **的博客 | **'s Blog
email: **@**
# SNS Setting
github_username: effiu
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://www.**.cn/
root: /blog
permalink: :year/:month/:day/:title/
permalink_defaults:
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace:
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 5
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD HH:mm:ss
time_format: HH:mm:ss
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: hexo-theme-next
##theme: theme-bmw
#
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo: https://github.com/**/blog.git
branch: master
nothing
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
hexo clean
hexo g
FATAL {
err: TypeError: Cannot read property 'length' of undefined
at module.exports (E:\My_blog\node_modules\hexo-related-popular-posts\lib\cache.js:26:89)
at Hexo.<anonymous> (E:\My_blog\node_modules\hexo-related-popular-posts\index.js:171:34)
at Hexo.tryCatcher (E:\My_blog\node_modules\bluebird\js\release\util.js:16:23)
at Hexo.<anonymous> (E:\My_blog\node_modules\bluebird\js\release\method.js:15:34)
at E:\My_blog\node_modules\hexo\lib\extend\filter.js:67:52
at tryCatcher (E:\My_blog\node_modules\bluebird\js\release\util.js:16:23)
at Object.gotValue (E:\My_blog\node_modules\bluebird\js\release\reduce.js:166:18)
at Object.gotAccum (E:\My_blog\node_modules\bluebird\js\release\reduce.js:155:25)
at Object.tryCatcher (E:\My_blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (E:\My_blog\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (E:\My_blog\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromiseCtx (E:\My_blog\node_modules\bluebird\js\release\promise.js:641:10)
at _drainQueueStep (E:\My_blog\node_modules\bluebird\js\release\async.js:97:12)
at _drainQueue (E:\My_blog\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (E:\My_blog\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (E:\My_blog\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:456:21)
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html
$ node -v && npm -v
v12.16.1
6.13.4
related_posts:
enable: true
title: # Custom header, leave empty to use the default one
display_in_home: false
params:
maxCount: 5
#PPMixingRate: 0.0
#isDate: false
#isImage: false
#isExcerpt: false
Lines 277 to 288 in 5883e29
Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。
希望显示Katex
在安装hexo-renderer-markdown-it-plus 并打开主题开关后,仍不能显示公式。然而mathjax是支持的。
katex:
enable: true
# See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
copy_tex: false
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Hexo
subtitle: ''
description: ''
keywords:
author: John Doe
language: en
timezone: ''
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
prismjs:
enable: false
preprocess: true
line_number: true
tab_replace: ''
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports 'mtime', 'date', 'empty'
updated_option: 'mtime'
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: git
repo: https://github.com/Philchieh/Philchieh.github.io.git
branch: master
# Math Formulas Render Support
# Server-side plugin: https://github.com/next-theme/hexo-filter-mathjax
math:
# Default (true) will load mathjax / katex script on demand.
# That is it only render those page which has `mathjax: true` in Front-matter.
# If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
per_page: true
# hexo-renderer-pandoc (or hexo-renderer-kramed) required for full MathJax support.
mathjax:
enable: false
# hexo-renderer-markdown-it-plus (or hexo-renderer-markdown-it with markdown-it-katex plugin) required for full Katex support.
katex:
enable: true
# See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
copy_tex: false
谷歌浏览器,win10系统
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.