由于css中限制了标签的宽高, 如果标题过长会无法显示, 因此需要修改css中的属性
在virgo/assets/scss/partials/content/nav.scss
中的.container-nav/.toc/li
中的width
utterances和isso两种评论系统搭建
isso
- 自建
- 数据存储在本地, 方便备份迁移
- 无需登陆
- 可配置审核等
搭建isso
1services:
2 isso:
3 container_name: isso
4 image: ghcr.io/isso-comments/isso:release
5 ports:
6 - "8080:8080"
7 restart: always
8 volumes:
9 - "/app/isso/data/config:/config"
10 - "/app/isso/data/db:/db"
配置: /app/isso/data/config/isso.cfg
编写
将js文件放在主题的static/js文件夹中,css文件放在主题的static/css文件夹中
在layouts/partials/head.html中添加
1 <script src="/js/hide_and_seek.js"></script>
2 <link rel="stylesheet" href="/css/hide_and_seek.css">
编写hide_and_seek.html
放在layouts/shortcodes/
文件夹中
当页面失去焦点时改变标题,恢复焦点时恢复标题
将js文件放在主题的static/js文件夹中
在layouts/partials/head.html中添加
1 {{ if .Site.Params.funnyTitle | default false }}
2 <script src="/js/funny_title.js"></script>
3 {{- end -}}
此时在hugo.toml中添加以下内容开启
删除图片边框
修改文件 themes/archive/assets/css/main.css
,注释掉border: 3px solid #ececec;
。
编写
编写arrow.html
、arrow_colour.html
、arrow_?.html
或arrow_?_colour.html
放在layouts/shortcodes/
文件夹中
编写
编写tag.html
或tag_?.html
放在layouts/shortcodes/
文件夹中
1<!-- layouts/shortcodes/tag.html -->
2<strong style= "background: {{ .Get "colour" }};border: 1px solid {{ .Get "colour" }};border-radius: 5px;">{{ .Get "tag" }}</strong>
1<!-- layouts/shortcodes/tag_academic.html -->
2<strong style= "background: #33BBFF;border: 1px solid #33BBFF;border-radius: 5px;">学术</strong>
使用
1{{< tag colour="green" tag="自定义" >}}
2
3{{< tag_academic >}}
4{{< tag_read >}}
5{{< tag_sport >}}
6{{< tag_kegel >}}
7{{< tag_relax >}}
8{{< tag_bathe >}}
9{{< tag_play >}}
10{{< tag_go_out >}}
11{{< tag_hentai >}}
学术
阅读
运动
提肛
放松
洗澡
游戏
外出
色色
1. 下载字体
添加到static/fonts
文件夹下,若使用了主题则可以放在主题的fonts文件夹下,如themes/archie/static/fonts
。
2. 添加字体
在fonts.css
中添加字体,如themes/archie/assets/css/fonts.css
编写
编写ruby.html
放在layouts/shortcodes/
文件夹中
1<!-- layouts/shortcodes/ruby.html -->
2<ruby>
3 {{ .Get "text" }}<rp>(</rp><rt>{{ .Get "title" }}</rt><rp>)</rp>
4</ruby>
使用
1{{< ruby title="完全没理解" text="太棒了,我逐渐理解一切" >}}