hexo-rebuilding-records

本文最后更新于:2023年6月19日 晚上

hexo init 报错

是由于无法 ping 通 github.com
其实我挂了梯子,但是没有想到学校的网络依旧不能连接通,导致一度以为电脑又出了什么问题。
然后我在 ip 网站查到了 github 现在的 ip 解析,然后挑了其中能 ping 通的修改了 host 文件。然后结果还是不行。(或许可以,但是我不知道什么时候好的)
然后我就直接在 hexo-starter 那个项目里 git clone 了(因为对比发现是一模一样的)

hexo 安装 theme

从 git 仓库中下载
https://chenzkun.top/page/2/
https://blog.flexiston.com/
这两位的主题我比较中意,我先挑 butterfly 试一试

hexo g

下载好 theme 后,需要 hexo g 生成预览
(网上教程直接就 hexo s,又走了很多弯路)

hexo s

预览报错
Hexo 启动页面显示 extends includes/layout.pug block content include includes/recent-posts.pug include
解决方案
npm install –save hexo-renderer-jade hexo-generator-feed hexo-generator-sitemap hexo-browsersync hexo-generator-archive
清除缓存
hexo clean
生成静态文件即可
hexo g

butterfly 特别语法

note

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{% note default %}
default 提示塊標籤
{% endnote %}
{% note primary no-icon %}
primary 提示塊標籤
{% endnote %}
{% note success %}
success 提示塊標籤
{% endnote %}
{% note info %}
info 提示塊標籤
{% endnote %}
{% note warning %}
warning 提示塊標籤
{% endnote %}
{% note danger %}
danger 提示塊標籤
{% endnote %}

image.png

primary 提示塊標籤

##

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<div class="gallery-group-main">
{% galleryGroup name description link img-url %}
{% galleryGroup name description link img-url %}
{% galleryGroup name description link img-url %}
</div>
name:图库名字。
description:图库描述。
link:连接到对应相册的地址。
img-url:图库封面的地址。
例如
<div class="gallery-group-main">
{% galleryGroup '壁紙' '收藏的一些壁紙' '/Gallery/wallpaper' https://i.loli.net/2019/11/10/T7Mu8Aod3egmC4Q.png %}
{% galleryGroup '漫威' '關於漫威的圖片' '/Gallery/marvel' https://i.loli.net/2019/12/25/8t97aVlp4hgyBGu.jpg %}
{% galleryGroup 'OH MY GIRL' '關於OH MY GIRL的圖片' '/Gallery/ohmygirl' https://i.loli.net/2019/12/25/hOqbQ3BIwa6KWpo.jpg %}
</div>
区别于旧版的 Gallery 相册,新的 Gallery 相册会自动根据图片长度进行排版,书写也更加方便,与 markdown 格式一样。 可根据需要插入到相应的 md。
{% gallery %}
![](https://i.loli.net/2019/12/25/Fze9jchtnyJXMHN.jpg)
![](https://i.loli.net/2019/12/25/ryLVePaqkYm4TEK.jpg)
![](https://i.loli.net/2019/12/25/gEy5Zc1Ai6VuO4N.jpg)
![](https://i.loli.net/2019/12/25/d6QHbytlSYO4FBG.jpg)
![](https://i.loli.net/2019/12/25/6nepIJ1xTgufatZ.jpg)
![](https://i.loli.net/2019/12/25/E7Jvr4eIPwUNmzq.jpg)
![](https://i.loli.net/2019/12/25/mh19anwBSWIkGlH.jpg)
![](https://i.loli.net/2019/12/25/2tu9JC8ewpBFagv.jpg)
{% endgallery %}

tag-hide

image.png

Tabs

image.png

theme 文件夹无法 git push

image.png


本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!