joeybling / hexo-theme-yilia-plus Goto Github PK
View Code? Open in Web Editor NEW一个简洁优雅的hexo主题 A simple and elegant theme for hexo.
Home Page: https://zhousiwei.gitee.io/yilia-plus-demo/
License: MIT License
一个简洁优雅的hexo主题 A simple and elegant theme for hexo.
Home Page: https://zhousiwei.gitee.io/yilia-plus-demo/
License: MIT License
请问怎么修改blog背景呢?(现在是纯白的)
是否可以考虑加一个文章内分页的功能呢?
当文章很长的时候,页面加载会变慢(尤其是公式很多的时候),而且也不方便其他人保存阅读进度。
比如文章有十章,可以每一章分一个页面(在文章底部有页面选项),比如可以以<!-- page -->
作为页面分隔。(不知道能不能实现,我猜想的。)
首先很抱歉, 因为我希望按自己的想法定制一下主题, 所以被迫需要修改大佬的代码里的source-src/js/main.js
文件, 请问题修改了文件后怎么才能生效?
因为我想在blog中添加 有分类层次结构, 所以引入了hexo-plugin-hierarchy-category
插件。
因此需要在项目中的source-src/js/main.js
文件添加如下代码:
import getHCateHelpers from "hexo-plugin-hierarchy-category";
const util = getHCateHelpers(hexo);
希望分类页能展示分类层次结构
Node.js & npm version
$ npm -v
6.14.4
$ node -v
v13.14.0
Your OSes (Optional)
macos 15
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Your browsers (Optional)
The browser you use
Your OSes (Optional)
what platforms (operating systems and devices) are affected?
发现一个问题,博主你的博客刚刚打开的时候,上下滚动有很明显的掉帧的感觉,但是过一会再滑动就没有这种感觉了,大概就是头像上面的画画完以后。应该不是错觉,重复实验了好几次都是这样,也肯定不是电脑配置太低
你好,我在使用这个主题的时候,在subNav中去掉了email的#,其他什么也没有动。然后我hexo clean,hexo g,hexo s
本地访问4000端口,点击了邮箱的图标,
结果却提示Cannot GET /mailto:[email protected]
Please describe what you expected to see.(请描述一下你希望看到什么)
我希望能正常的打开邮箱的软件
Node.js & npm version
$ node -v
v10.16.0
```$ bash --version
bash --version
GNU bash, version 4.4.19(2)-release (x86_64-pc-msys)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
**Your browsers** (Optional)
> The browser you use
ie edge
chrome
电脑上的网易云背景音乐是否添加到手机中显示
您好我使用您的主题发现您的那个网易云音乐的插件的自动播放功能无法正常使用,需要手动播放,希望您能够回复下解决方法
之前降低版本的回答 经过测试依旧存在
添加网页监听事件,添加版权信息到剪贴板。以实现复制文本时包含有版权声明。
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Your browsers (Optional)
The browser you use
Your OSes (Optional)
what platforms (operating systems and devices) are affected?
hexo -s css格式错误
at Theme._View.View.View._precompile (D:\blog\node_modules\hexo\lib\theme\view.js:119:29)
at Theme._View.View.View (D:\blog\node_modules\hexo\lib\theme\view.js:13:8)
at new Theme._View.View (D:\blog\node_modules\hexo\lib\theme\index.js:37:10)
at Theme.setView (D:\blog\node_modules\hexo\lib\theme\index.js:71:20)
at D:\blog\node_modules\hexo\lib\theme\processors\view.js:14:14
at tryCatcher (D:\blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\blog\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (D:\blog\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (D:\blog\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\blog\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (D:\blog\node_modules\bluebird\js\release\promise.js:638:18)
at Promise._resolveCallback (D:\blog\node_modules\bluebird\js\release\promise.js:432:57)
at Promise._settlePromiseFromHandler (D:\blog\node_modules\bluebird\js\release\promise.js:524:17)
at Promise._settlePromise (D:\blog\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (D:\blog\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\blog\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (D:\blog\node_modules\bluebird\js\release\promise.js:638:18)
at D:\blog\node_modules\bluebird\js\release\nodeback.js:42:21
at D:\blog\node_modules\graceful-fs\graceful-fs.js:78:16
ERROR Process failed: layout/_partial/tools.ejs
SyntaxError: Invalid or unexpected token in "D:\blog\themes\yilia-plus\layout\_partial\tools.ejs"
at new Function ()
at Object.exports.compile (D:\blog\node_modules\ejs\lib\ejs.js:242:14)
at Function.ejsRenderer.compile (D:\blog\node_modules\hexo-renderer-ejs\lib\renderer.js:11:14)
at Theme._View.View.View._precompile (D:\blog\node_modules\hexo\lib\theme\view.js:119:29)
at Theme._View.View.View (D:\blog\node_modules\hexo\lib\theme\view.js:13:8)
at new Theme._View.View (D:\blog\node_modules\hexo\lib\theme\index.js:37:10)
at Theme.setView (D:\blog\node_modules\hexo\lib\theme\index.js:71:20)
at D:\blog\node_modules\hexo\lib\theme\processors\view.js:14:14
at tryCatcher (D:\blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\blog\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (D:\blog\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (D:\blog\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\blog\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (D:\blog\node_modules\bluebird\js\release\promise.js:638:18)
at Promise._resolveCallback (D:\blog\node_modules\bluebird\js\release\promise.js:432:57)
at Promise._settlePromiseFromHandler (D:\blog\node_modules\bluebird\js\release\promise.js:524:17)
at Promise._settlePromise (D:\blog\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (D:\blog\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\blog\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (D:\blog\node_modules\bluebird\js\release\promise.js:638:18)
at D:\blog\node_modules\bluebird\js\release\nodeback.js:42:21
at D:\blog\node_modules\graceful-fs\graceful-fs.js:78:16
ERROR Process failed: layout/_partial/post/date.ejs
SyntaxError: Invalid or unexpected token in "D:\blog\themes\yilia-plus\layout\_partial\post\date.ejs"
at new Function ()
at Object.exports.compile (D:\blog\node_modules\ejs\lib\ejs.js:242:14)
at Function.ejsRenderer.compile (D:\blog\node_modules\hexo-renderer-ejs\lib\renderer.js:11:14)
at Theme._View.View.View._precompile (D:\blog\node_modules\hexo\lib\theme\view.js:119:29)
at Theme._View.View.View (D:\blog\node_modules\hexo\lib\theme\view.js:13:8)
at new Theme._View.View (D:\blog\node_modules\hexo\lib\theme\index.js:37:10)
at Theme.setView (D:\blog\node_modules\hexo\lib\theme\index.js:71:20)
at D:\blog\node_modules\hexo\lib\theme\processors\view.js:14:14
at tryCatcher (D:\blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\blog\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (D:\blog\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (D:\blog\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\blog\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (D:\blog\node_modules\bluebird\js\release\promise.js:638:18)
at Promise._resolveCallback (D:\blog\node_modules\bluebird\js\release\promise.js:432:57)
at Promise._settlePromiseFromHandler (D:\blog\node_modules\bluebird\js\release\promise.js:524:17)
at Promise._settlePromise (D:\blog\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (D:\blog\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\blog\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (D:\blog\node_modules\bluebird\js\release\promise.js:638:18)
at D:\blog\node_modules\bluebird\js\release\nodeback.js:42:21
at D:\blog\node_modules\graceful-fs\graceful-fs.js:78:16
INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Your browsers (Optional)
The browser you use
Your OSes (Optional)
what platforms (operating systems and devices) are affected?
如图:https://i.loli.net/2019/12/27/AYeHoThcnx289mI.gif
当设备屏幕宽度过小时(比如320px的情况下),侧边栏把整个屏幕都遮住了,导致不能点击其他地方让侧边栏菜单关闭,其实在移动端状态下可以直接把侧边栏菜单做成全屏,然后添加一个关闭的按钮进行显示状态的切换就行了
我想要设置一个背景图片,如何设置啊,可以自定义设置
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Your browsers (Optional)
The browser you use
Your OSes (Optional)
what platforms (operating systems and devices) are affected?
比如”网易、腾讯、酷狗、虾米、百度“
推荐使用
Hexo
版本:3.9.0
解决办法如下(原因:
hexo
版本过高,降低版本):博客根目录执行
npm uninstall hexo --save
npm install [email protected] --save
降低版本后需注释或删除博客根目录
_config.yml
文件的include
、exclude
、ignore
配置
返回顶部的图标不显示
你好,今天使用了这个theme,但是发现返回顶部的图标无法显示,请问这个什么原因呢?
还望楼主能够看看,帮助我解决下
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Your browsers (Optional)
The browser you use
Your OSes (Optional)
what platforms (operating systems and devices) are affected?
.config.yml 里 url 的schema如果是https,yilia_plus_full_url 生成的结果是错的。
假如url里配置的是: https://aaa.github.io
最后生成的是: https:/aaa.github.io/
具体原因是 scripts/helpers/yilia-plus-vendors.js 里的这段代码,在最后替换的时候并未将https考虑进去
let fullUrl = (blogUrl + url).replace(/(\\|\/){2,}/g, '/')
.replace(/((ht|f)tp\:(\\|\/)+)/ig, 'http://');
预期生成结果是: https://aaa.github.io/
个人觉得这个功能还是挺重要的。
如果文章中有原创版权声明,复制时,会携带相关信息。
我自己也去查了下,找到的好像都是next主题的,没有yilia主题的,但是不太会转化……
参考链接
提一个功能需求:新增一个禁止文章复制的功能,类似于知乎的一些回答,连续复制不能超过15个字好像
创建了categories 和tags然后其下面的index.md也做了相应设置,发表的文章添加了不同的标签和分类,点击分类或标签页面是空的
分类下应该会统计有几个分类,标签下应该会显示几个标签
categories/index.md
---
title: 分类
date: 2019-08-22 21:24:05
type: "categories"
layout: "categories"
---
post文章
---
title: reat入门
tags:
- react
categories:
- react
---
react文章
新建一个分类的page后 在所有的文章上加上分类的标签 在主题下面的配置文件下菜单上也加上分类
结构分类页面还是空的 这个是怎么回事啊
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Your browsers (Optional)
The browser you use
Your OSes (Optional)
what platforms (operating systems and devices) are affected?
你好,我在用git管理博客的本地文件之后,github的仓库出现alerts。我的具体做法是:
.../yilia-plus/package-lock.json
Node.js & npm version
node: v12.16.1
npm 6.13.4
如果是绝对路径,不方便部署到自己的服务器中,会导致很多文件丢失。
举个例子,这个是相对路径:
生成HTML后会变成这样/./main.826e88.css
,尝试去访问public
里面的文件就会发现很多类似的问题。
教程如下:https://www.jianshu.com/p/e8d433a2c5b7
引擎换成mathjax(kramed替换marked,改变两条转义规则)后,hexo -s g报错:
SyntaxError: Invalid or unexpected token in "/Users/用户名/hexo/themes/yilia-plus/layout/layout.ejs"
at new Function ()
at exports.compile (/Users/用户名/hexo/node_modules/hexo-renderer-mathjax/node_modules/ejs/lib/ejs.js:242:14)
at Object.exports.render (/Users/用户名/hexo/node_modules/hexo-renderer-mathjax/node_modules/ejs/lib/ejs.js:284:66)
at Hexo. (/Users/用户名/hexo/node_modules/hexo-renderer-mathjax/index.js:14:24)
at Hexo.tryCatcher (/Users/用户名/hexo/node_modules/bluebird/js/release/util.js:16:23)
at Hexo.ret (eval at makeNodePromisifiedEval (/usr/local/lib/node_modules/用户名/node_modules/bluebird/js/release/promisify.js:184:12), :13:39)
ps:换成别的主题没什么问题,可以正常编译和生成,显示数学公式。望解决一下,感谢!!!
Node.js & npm version
node.js V12.8.1
[email protected]
我在 Hexo 博客中应用该主题后,文章列表中,文章过长,没有收缩。地址:h ttps://warmfrog.github.io. 主题配置中的 excerpt_link: more 好像没起作用
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Your browsers (Optional)
The browser you use
Your OSes (Optional)
what platforms (operating systems and devices) are affected?
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
npm -v 6.11.3
Node.js -v v12.12.0.
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Your browsers (Optional)
The browser you use
Your OSes (Optional)
what platforms (operating systems and devices) are affected?
主页显示的内容应该是经过裁剪的,以“显示更多”的形式查看全文,我看到你的博客也是这样的。
但是我在使用了你的主题之后,发现主页的内容并没有按照预期的进行裁剪,排查了很久也没发现原因。
请参考:我的博客
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Your browsers (Optional)
The browser you use
Your OSes (Optional)
what platforms (operating systems and devices) are affected?
现在的文章字段搜索还只是文章标题搜索,没有做到全文搜索,麻烦大佬优化一下
我的gitee配置好了之后在上方显示Error: 404 Project Not Found
,请问是不是有什么地方配置除了问题?登录是可以登陆的,但是无法评论,点击Issue Page 是显示Github 的Page not found
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Your browsers (Optional)
The browser you use
Your OSes (Optional)
what platforms (operating systems and devices) are affected?
添加标签页面hexo new page tags
无效,网上很多都说这样就可以直接生成有标签的页面,而我的却不行;我不知道是不是我在配置的时候删除了什么文件造成的?想问下有没有人遇到过同样的问题?
在执行hexo g
后生成的\public\tags\index.html
文件中却没有标签的相关内容(注:已有文章中存在有tag属性),所以显示的压根就只是一个空白页(如下图):
和tags页面一样,categories页面也显示不出来。
而对于归档: /archives
页面好像只需要在配置文件中开启设置就可以了(这个功能好像内置了),查看了下source目录是没有/archives目录,而public\archives\index.html
里面却是有归档内容,所以归档页面可以显示归档信息。
标签页面能够正常显示,就和归档页面一样。
Please describe what you expected to see.(请描述一下你希望看到什么)
Node.js & npm version
$ node -v
v10.16.0
$ npm -v
6.9.0
Your theme _config.yml
(Optional)
添加标签页面hexo new page tags
,会在生成\source\tags\index.md
文件,编辑的内容为:
---
title: tags
date: 2019-07-30 10:11:45
type: tags
comments: false
---
同时在配置文件\themes\yilia\_config.yml
中设置:
menu:
主页: /
#随笔: /tags/随笔/
分类: /categories
归档: /archives
相册: /photos
标签: /tags
menu菜单设置成可配置---是否在新窗口打开
yilia原来的declare_type字段没了,换成的写死的Apache协议,希望添加回来
你这里的百度推送方式应该是“自动推送”,不是主动推送,具体可参考:https://ziyuan.baidu.com/college/articleinfo?id=1504
推荐
(1)主动推送:使用hexo-baidu-url-submit
插件,github: https://github.com/huiwang/hexo-baidu-url-submit
(2)sitemap:使用 hexo generator-baidu-sitemap
插件,github:https://github.com/coneycode/hexo-generator-baidu-sitemap
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.