🎨 Add more article content for demo.
This commit is contained in:
parent
5fe253ab57
commit
836fe1ea10
@ -1,14 +1,15 @@
|
|||||||
@if $toc_enable {
|
@if $toc_enable {
|
||||||
.post-toc {
|
.post-toc {
|
||||||
font-size: $font-size-small;
|
font-size: $font-size-small;
|
||||||
|
padding: 0 8px;
|
||||||
|
|
||||||
ol {
|
ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 2px 5px 10px;
|
padding: 0 2px 5px 10px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
> ol {
|
> li {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
# ===============================================================
|
#:==============================================================
|
||||||
# It's recommended to use Alternate Theme Config to configure NexT
|
# It's recommended to use Alternate Theme Config to configure NexT
|
||||||
# Modifying this file may result in merge conflict
|
# Modifying this file may result in merge conflict
|
||||||
# See: https://theme-next.js.org/docs/getting-started/configuration
|
# See: https://theme-next.js.org/docs/getting-started/configuration
|
||||||
# ===============================================================
|
#:==============================================================
|
||||||
|
|
||||||
baseURL: /
|
baseURL: /
|
||||||
|
|
||||||
theme: hugo-theme-next
|
theme: hugo-theme-next
|
||||||
|
paginate: 10
|
||||||
paginate: 8
|
|
||||||
|
|
||||||
enableEmoji: true
|
enableEmoji: true
|
||||||
|
|
||||||
# Make markdown content support HTML syntax
|
# Make markdown content support HTML syntax
|
||||||
@ -17,6 +15,15 @@ markup:
|
|||||||
goldmark:
|
goldmark:
|
||||||
renderer:
|
renderer:
|
||||||
unsafe: true
|
unsafe: true
|
||||||
|
highlight:
|
||||||
|
codeFences: true
|
||||||
|
lineNos: true
|
||||||
|
lineNumbersInTable: true
|
||||||
|
noClasses: true
|
||||||
|
tableOfContents:
|
||||||
|
endLevel: 3
|
||||||
|
ordered: false
|
||||||
|
startLevel: 1
|
||||||
|
|
||||||
defaultContentLanguage: zh-cn
|
defaultContentLanguage: zh-cn
|
||||||
languages:
|
languages:
|
||||||
@ -305,11 +312,11 @@ params:
|
|||||||
# Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, http://www.beian.gov.cn
|
# Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, http://www.beian.gov.cn
|
||||||
beian:
|
beian:
|
||||||
enable: true
|
enable: true
|
||||||
icp: 粤ICP备18047355-1号
|
icp: 粤ICP备 18047355-1 号
|
||||||
# The digit in the num of gongan beian.
|
# The digit in the num of gongan beian.
|
||||||
provinceAbbr: 沪
|
provinceAbbr: 沪
|
||||||
# The full num of gongan beian.
|
# The full num of gongan beian.
|
||||||
gonganNum: 11010102001808
|
gonganNum: 31011402009770
|
||||||
# The icon for gongan beian. See: http://www.beian.gov.cn/portal/download
|
# The icon for gongan beian. See: http://www.beian.gov.cn/portal/download
|
||||||
#gongan_icon_url:
|
#gongan_icon_url:
|
||||||
|
|
||||||
@ -763,7 +770,7 @@ params:
|
|||||||
|
|
||||||
# AddThis Share. See: https://www.addthis.com
|
# AddThis Share. See: https://www.addthis.com
|
||||||
# Go to https://www.addthis.com/dashboard to customize your tools.
|
# Go to https://www.addthis.com/dashboard to customize your tools.
|
||||||
addThisId:
|
addThisId: ra-6049e46e9ee22127
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
19
exampleSite/content/about.md
Normal file
19
exampleSite/content/about.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
title: "关于 Hugo NexT 组织"
|
||||||
|
description: ""
|
||||||
|
|
||||||
|
date: 2022-06-09T20:12:52+08:00
|
||||||
|
lastmod: 2022-06-09T20:12:52+08:00
|
||||||
|
|
||||||
|
share: false
|
||||||
|
followme: false
|
||||||
|
nav: false
|
||||||
|
copyright: false
|
||||||
|
url: about.html
|
||||||
|
---
|
||||||
|
|
||||||
|
`Hugo NexT` 组织是由众多喜爱 `NexT` 主题及风格的世界各地友人共同组建而成,为的就是让这个主题继续在 `Hugo` 引擎中也能得到发扬光大,在此也欢迎你的加入!
|
||||||
|
|
||||||
|
# 我们的愿景
|
||||||
|
|
||||||
|
延续 `NexT` 经典的黑白调搭配,保持简单的易用性及强大的功能。
|
@ -43,10 +43,28 @@ url: markdown-syntax.html
|
|||||||
|
|
||||||
## 图像
|
## 图像
|
||||||
|
|
||||||
|
### Markdown 语法
|
||||||
|
|
||||||
|
```markdown
|
||||||
|

|
||||||
|
```
|
||||||

|

|
||||||
|
|
||||||
|
### HTML IMG 标签
|
||||||
|
|
||||||
|
```html
|
||||||
|
<img src="图像地址" width="宽度" height="高度" />
|
||||||
|
```
|
||||||
<img src="//lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-secondary.png" width="150"/>
|
<img src="//lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-secondary.png" width="150"/>
|
||||||
|
|
||||||
|
### SVG 格式
|
||||||
|
|
||||||
|
```html
|
||||||
|
<svg>xxxxxx</svg>
|
||||||
|
```
|
||||||
|
|
||||||
|
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
||||||
|
|
||||||
## 列表类型
|
## 列表类型
|
||||||
|
|
||||||
### 有序列表
|
### 有序列表
|
||||||
|
147
exampleSite/content/posts/syntax-highlighting.md
Normal file
147
exampleSite/content/posts/syntax-highlighting.md
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
---
|
||||||
|
title: "Hugo 内置的 Chroma 语法高亮"
|
||||||
|
description: "描述下 Chroma 所支持的各种语法及高亮效果展示"
|
||||||
|
keywords: "Chroma,语法,高亮"
|
||||||
|
|
||||||
|
date: 2022-06-07T19:09:52+08:00
|
||||||
|
lastmod: 2022-06-07T19:09:52+08:00
|
||||||
|
|
||||||
|
categories:
|
||||||
|
- 示例
|
||||||
|
tags:
|
||||||
|
- 语法
|
||||||
|
- 高亮
|
||||||
|
- Chroma
|
||||||
|
|
||||||
|
url: "syntax-highlighting.html"
|
||||||
|
---
|
||||||
|
|
||||||
|
Hugo 通过 Chroma 提供非常快速的语法高亮显示,现 Hugo 中使用 Chroma 作为代码块高亮支持,它内置在 Go 语言当中,速度是真的非常、非常快,而且最为重要的是它也兼容之前我们使用的 Pygments 方式。
|
||||||
|
|
||||||
|
以下通过 Hugo 内置短代码 `highlight` 和 `Markdown` 代码块方式分别验证不同语言的代码块渲染效果并能正确高亮显示,有关优化语法突出显示的更多信息,请参阅 [Hugo 文档](https://gohugo.io/getting-started/configuration-markup#highlight)。
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
# 编程语言
|
||||||
|
|
||||||
|
## GO
|
||||||
|
|
||||||
|
{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
|
||||||
|
|
||||||
|
func GetTitleFunc(style string) func(s string) string {
|
||||||
|
switch strings.ToLower(style) {
|
||||||
|
case "go":
|
||||||
|
return strings.Title
|
||||||
|
case "chicago":
|
||||||
|
return transform.NewTitleConverter(transform.ChicagoStyle)
|
||||||
|
default:
|
||||||
|
return transform.NewTitleConverter(transform.APStyle)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{{< / highlight >}}
|
||||||
|
|
||||||
|
## Java
|
||||||
|
|
||||||
|
```java
|
||||||
|
import javax.swing.JFrame; //Importing class JFrame
|
||||||
|
import javax.swing.JLabel; //Importing class JLabel
|
||||||
|
public class HelloWorld {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
JFrame frame = new JFrame(); //Creating frame
|
||||||
|
frame.setTitle("Hi!"); //Setting title frame
|
||||||
|
frame.add(new JLabel("Hello, world!"));//Adding text to frame
|
||||||
|
frame.pack(); //Setting size to smallest
|
||||||
|
frame.setLocationRelativeTo(null); //Centering frame
|
||||||
|
frame.setVisible(true); //Showing frame
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Python
|
||||||
|
|
||||||
|
``` python
|
||||||
|
print "Hello, world!"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Git 对比
|
||||||
|
|
||||||
|
``` diff {hl_lines=[4,"6-7"], linenos=true}
|
||||||
|
*** /path/to/original ''timestamp''
|
||||||
|
--- /path/to/new ''timestamp''
|
||||||
|
***************
|
||||||
|
*** 1 ****
|
||||||
|
! This is a line.
|
||||||
|
--- 1 ---
|
||||||
|
! This is a replacement line.
|
||||||
|
It is important to spell
|
||||||
|
-removed line
|
||||||
|
+new line
|
||||||
|
```
|
||||||
|
|
||||||
|
```diff {hl_lines=[4,"6-7"], linenos=false}
|
||||||
|
*** /path/to/original ''timestamp''
|
||||||
|
--- /path/to/new ''timestamp''
|
||||||
|
***************
|
||||||
|
*** 1 ****
|
||||||
|
! This is a line.
|
||||||
|
--- 1 ---
|
||||||
|
! This is a replacement line.
|
||||||
|
It is important to spell
|
||||||
|
-removed line
|
||||||
|
+new line
|
||||||
|
```
|
||||||
|
|
||||||
|
# 文件
|
||||||
|
|
||||||
|
## Make 文件
|
||||||
|
|
||||||
|
``` makefile {linenos=false}
|
||||||
|
CC=gcc
|
||||||
|
CFLAGS=-I.
|
||||||
|
|
||||||
|
hellomake: hellomake.o hellofunc.o
|
||||||
|
$(CC) -o hellomake hellomake.o hellofunc.o -I.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Markdown 文档
|
||||||
|
|
||||||
|
``` markdown
|
||||||
|
**bold**
|
||||||
|
*italics*
|
||||||
|
[link](www.example.com)
|
||||||
|
```
|
||||||
|
|
||||||
|
# 数据内容
|
||||||
|
|
||||||
|
## JSON 数据
|
||||||
|
|
||||||
|
``` json
|
||||||
|
{"employees":[
|
||||||
|
{"firstName":"John", "lastName":"Doe"},
|
||||||
|
]}
|
||||||
|
```
|
||||||
|
|
||||||
|
## XML 内容
|
||||||
|
|
||||||
|
``` xml
|
||||||
|
<employees>
|
||||||
|
<employee>
|
||||||
|
<firstName>John</firstName> <lastName>Doe</lastName>
|
||||||
|
</employee>
|
||||||
|
</employees>
|
||||||
|
```
|
||||||
|
|
||||||
|
## SQL 查询
|
||||||
|
|
||||||
|
{{< highlight sql >}}
|
||||||
|
|
||||||
|
SELECT column_name,column_name
|
||||||
|
FROM
|
||||||
|
Table
|
||||||
|
WHERE column_name = "condition"
|
||||||
|
{{< / highlight >}}
|
||||||
|
|
||||||
|
|
||||||
|
除以上列举的代码高亮显示外,还支持诸如:C 语言、C++、HTML、CSS、Shell脚本等各主流的代码语言高亮显示,可自行测试效果。
|
||||||
|
|
58
exampleSite/content/posts/table-of-content.md
Normal file
58
exampleSite/content/posts/table-of-content.md
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
---
|
||||||
|
title: "文章目录导航"
|
||||||
|
description: "描述下 NexT 主题下的文章目录导航效果。"
|
||||||
|
keywords: "文章,目录,导航"
|
||||||
|
|
||||||
|
date: 2022-06-08T21:12:52+08:00
|
||||||
|
lastmod: 2022-06-08T21:12:52+08:00
|
||||||
|
|
||||||
|
categories:
|
||||||
|
- 示例
|
||||||
|
tags:
|
||||||
|
- 目录
|
||||||
|
- 导航
|
||||||
|
- 博客
|
||||||
|
|
||||||
|
toc: true
|
||||||
|
url: "table-of-content.html"
|
||||||
|
---
|
||||||
|
|
||||||
|
巴顿将军说过:“衡量一个人是否成功,不是看他站到顶峰,而是从顶峰跌落之后的反弹力”,褚时健的人生便是如此,中年发家致富,名利双收,之后又跌落到谷底,等到74岁再创业,10年后带着褚橙归来,东山再起收获亿万财富,他的发展轨迹就是反弹的过程。
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
# 早年的故事
|
||||||
|
## 起始
|
||||||
|
|
||||||
|
2014年的春天,在云南省华宁县和宜良县的交界处,一座名叫矣则的小山村里,一处已经有上百年历史的古旧四合院宅子被拆掉。村委会正带领村民们进行“美丽乡村”的建设,一年以后,旧有村居将再也看不到,代之而起的是钢筋混凝土的新式民居。就像10年、20年前中国大小城市的改造一样,这个群山围绕的小村子也开始陷入“工地模式”。
|
||||||
|
|
||||||
|
### 童年浪花
|
||||||
|
|
||||||
|
在江河边长大的孩子几乎都有一个当仁不让的特长:善水。褚时健也不例外,他不仅从小就在南盘江和花鱼塘里扑腾出了上佳的游泳技术,五六岁已经可以一个猛子扎出老远,而且从七八岁就可以在南盘江和河滩上的鱼塘里捉鱼了。
|
||||||
|
|
||||||
|
## 少年故事
|
||||||
|
|
||||||
|
褚时健在乡村自由自在生活的十多年,其实正是中国社会风雨飘摇的十多年。特别是1937年卢沟桥事变后,日本人发动全面侵华战争,短短两三年间,中国的大部分国土相继沦陷
|
||||||
|
|
||||||
|
# 激情的青春十年
|
||||||
|
## 当上了游击队员
|
||||||
|
|
||||||
|
1948年夏天,褚时健回乡,在禄丰车站小学做了一名老师,同时也和褚时仁、褚时杰一起继续保持与共产党组织的联系,做一些传递情报的工作
|
||||||
|
|
||||||
|
### 战火纷飞
|
||||||
|
|
||||||
|
因为战斗力相较悬殊,所以游击队只能是靠打一枪换一个地方的办法,专找敌人薄弱的地方攻击,但更多时候,都是在防御和转移阵地。
|
||||||
|
|
||||||
|
# 生活的断层
|
||||||
|
## 跌入生活底层
|
||||||
|
|
||||||
|
“反右”运动中被打倒的人在“右派”身份确定后,只有一条路可走:下放到农场。农场名副其实,就是干农活儿的地方,必须过和农民一样的生活。
|
||||||
|
|
||||||
|
|
||||||
|
# 尾声
|
||||||
|
|
||||||
|
## 岁月像一条河
|
||||||
|
|
||||||
|
2015年,是褚时健和马静芬结婚60周年,被称为“钻石婚”的纪念年份。这简直是一份人生的奖赏,在中国离婚率愈益升高的当下,60年的婚姻,几乎就像一个前世之梦。一个甲子的相伴相随,褚时健和马静芬共同经历了国家和个人的各种风浪,共同面对过生死。他们两人已经不仅是夫妻,更是一对战友。尽管马静芬偶尔会对褚时健年轻时候的粗心抱怨上两句,但说到最后,她会说一句:“没有我就没有他,没有他也就没有我。”
|
@ -10,11 +10,18 @@
|
|||||||
<div class="post-eof"></div>
|
<div class="post-eof"></div>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{ partial "post/footer_meta/tags.html" . }}
|
{{ partial "post/footer_meta/tags.html" . }}
|
||||||
|
{{- if and (not (isset .Params "share")) (not .Params.share) }}
|
||||||
{{ partial "_thirdparty/share/addthis.html" . }}
|
{{ partial "_thirdparty/share/addthis.html" . }}
|
||||||
|
{{- end }}
|
||||||
<hr/>
|
<hr/>
|
||||||
{{ partial "post/footer_meta/reward.html" . }}
|
{{ partial "post/footer_meta/reward.html" . }}
|
||||||
|
{{- if and (not (isset .Params "copyright")) (not .Params.copyright) }}
|
||||||
{{ partial "post/footer_meta/copyright.html" . }}
|
{{ partial "post/footer_meta/copyright.html" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and (not (isset .Params "followme")) (not .Params.followme) }}
|
||||||
{{ partial "post/footer_meta/followme.html" . }}
|
{{ partial "post/footer_meta/followme.html" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and (not (isset .Params "nav")) (not .Params.nav) }}
|
||||||
<div class="post-nav">
|
<div class="post-nav">
|
||||||
<div class="post-nav-next post-nav-item">
|
<div class="post-nav-next post-nav-item">
|
||||||
{{- with .NextInSection }}
|
{{- with .NextInSection }}
|
||||||
@ -33,4 +40,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
@ -4,7 +4,7 @@
|
|||||||
<span class="toggle-line"></span>
|
<span class="toggle-line"></span>
|
||||||
</div>
|
</div>
|
||||||
<aside class="sidebar">
|
<aside class="sidebar">
|
||||||
{{- $toc := and (isset .Page.Params "toc") .Page.Params.toc }}
|
{{- $toc := and (isset .Params "toc") .Params.toc }}
|
||||||
<div class="sidebar-inner {{ if $toc }}sidebar-nav-active sidebar-toc-active{{ else }}sidebar-overview-active{{ end }}">
|
<div class="sidebar-inner {{ if $toc }}sidebar-nav-active sidebar-toc-active{{ else }}sidebar-overview-active{{ end }}">
|
||||||
<ul class="sidebar-nav">
|
<ul class="sidebar-nav">
|
||||||
<li class="sidebar-nav-toc">
|
<li class="sidebar-nav-toc">
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<!--noindex-->
|
<!--noindex-->
|
||||||
<div class="post-toc-wrap sidebar-panel">
|
<div class="post-toc-wrap sidebar-panel">
|
||||||
{{- if $toc }}
|
{{- if $toc }}
|
||||||
<div class="post-toc animated">{{ .Page.TableOfContents }}</div>
|
<div class="post-toc animated">{{ .TableOfContents }}</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
<!--/noindex-->
|
<!--/noindex-->
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
{{ .TableOfContents }}
|
Loading…
Reference in New Issue
Block a user