Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8405b789e9 | ||
|
|
db7095c0bb | ||
|
|
9453520e2a | ||
|
|
35fff3e0cc | ||
|
|
b4c5e79c1b | ||
|
|
7be11c4b7f | ||
|
|
03b83da513 |
@@ -1,5 +1,5 @@
|
|||||||
# Hugo NexT theme's custom config
|
# Hugo NexT theme's custom config
|
||||||
|
|
||||||
version: 4.5.0
|
version: 4.5.3
|
||||||
|
|
||||||
domain: hugo-next.eu.org
|
domain: hugo-next.eu.org
|
||||||
@@ -470,6 +470,7 @@ params:
|
|||||||
# 开启文章头部元素显示
|
# 开启文章头部元素显示
|
||||||
# Post meta display settings
|
# Post meta display settings
|
||||||
postMeta:
|
postMeta:
|
||||||
|
# 是否开启各元素的文字显示
|
||||||
itemText: true
|
itemText: true
|
||||||
created: true
|
created: true
|
||||||
updated:
|
updated:
|
||||||
@@ -822,8 +823,6 @@ params:
|
|||||||
# Waline comments system
|
# Waline comments system
|
||||||
# More info seee: https://waline.js.org/
|
# More info seee: https://waline.js.org/
|
||||||
waline:
|
waline:
|
||||||
pageView: true
|
|
||||||
comment: true
|
|
||||||
placeholder: "请文明发言哟 ヾ(≧▽≦*)o"
|
placeholder: "请文明发言哟 ヾ(≧▽≦*)o"
|
||||||
sofa: "快来发表你的意见吧 (≧∀≦)ゞ"
|
sofa: "快来发表你的意见吧 (≧∀≦)ゞ"
|
||||||
emoji: false
|
emoji: false
|
||||||
@@ -964,6 +963,9 @@ params:
|
|||||||
indexName: #<algolia index name>
|
indexName: #<algolia index name>
|
||||||
hits:
|
hits:
|
||||||
perPage: 10
|
perPage: 10
|
||||||
|
# 索引生成内容长度字数限制
|
||||||
|
# Index generation content length word count limit.
|
||||||
|
limit: 1000
|
||||||
|
|
||||||
# 本地搜索
|
# 本地搜索
|
||||||
# Local Search
|
# Local Search
|
||||||
@@ -987,6 +989,9 @@ params:
|
|||||||
# 页面加载时是否要重新载入索引文件
|
# 页面加载时是否要重新载入索引文件
|
||||||
# Preload the search data when the page loads.
|
# Preload the search data when the page loads.
|
||||||
preload: false
|
preload: false
|
||||||
|
# 索引生成内容长度字数限制
|
||||||
|
# Index generation content length word count limit.
|
||||||
|
limit: 1000
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@@ -1102,7 +1107,6 @@ params:
|
|||||||
# CDN Settings
|
# CDN Settings
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|
||||||
vendors:
|
|
||||||
vendors:
|
vendors:
|
||||||
# The CDN provider of NexT internal scripts.
|
# The CDN provider of NexT internal scripts.
|
||||||
# Available values: local | unpkg | cdnjs | qiniu | bootcdn | custom
|
# Available values: local | unpkg | cdnjs | qiniu | bootcdn | custom
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ originLink: https://mainroad-demo.netlify.app/post/basic-elements/
|
|||||||
|
|
||||||
categories:
|
categories:
|
||||||
- 示例文章
|
- 示例文章
|
||||||
- 语法
|
- Markdown语法
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- Markdown
|
- Markdown
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ print "Hello, world!"
|
|||||||
|
|
||||||
### Git 对比
|
### Git 对比
|
||||||
|
|
||||||
``` diff {hl_lines=[4,"6-7"], linenos=true}
|
```diff {hl_lines=[4,"6-7"], linenos=true}
|
||||||
*** /path/to/original ''timestamp''
|
*** /path/to/original ''timestamp''
|
||||||
--- /path/to/new ''timestamp''
|
--- /path/to/new ''timestamp''
|
||||||
***************
|
***************
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{ $limit := .Site.Params.algoliaSearch.limit | default 1000 }}
|
||||||
[
|
[
|
||||||
{{ range $index, $entry := where .Site.RegularPages "Kind" "page" }}
|
{{ range $index, $entry := where .Site.RegularPages "Kind" "page" }}
|
||||||
{{ if $index }}, {{ end }}
|
{{ if $index }}, {{ end }}
|
||||||
@@ -5,7 +6,11 @@
|
|||||||
"objectID": "{{ .Date.Unix }}",
|
"objectID": "{{ .Date.Unix }}",
|
||||||
"permalink": "{{ .Permalink | relURL }}",
|
"permalink": "{{ .Permalink | relURL }}",
|
||||||
"title": {{ .Title | jsonify }},
|
"title": {{ .Title | jsonify }},
|
||||||
|
{{ if gt .WordCount $limit }}
|
||||||
|
"content": {{ .Plain | truncate $limit | jsonify | safeJS }},
|
||||||
|
{{ else }}
|
||||||
"content": {{ .Plain | jsonify | safeJS }},
|
"content": {{ .Plain | jsonify | safeJS }},
|
||||||
|
{{ end }}
|
||||||
"date": {{ .Date.Format $.Site.Params.timeFormat | jsonify }},
|
"date": {{ .Date.Format $.Site.Params.timeFormat | jsonify }},
|
||||||
"updated": {{ .Lastmod.Format $.Site.Params.timeFormat | jsonify }}
|
"updated": {{ .Lastmod.Format $.Site.Params.timeFormat | jsonify }}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{ $limit := .Site.Params.localSearch.limit | default 1000 }}
|
||||||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||||
<search>
|
<search>
|
||||||
{{range where .Site.RegularPages "Kind" "page"}}
|
{{range where .Site.RegularPages "Kind" "page"}}
|
||||||
@@ -12,7 +13,7 @@
|
|||||||
<tag>{{ . }}</tag>
|
<tag>{{ . }}</tag>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</tags>
|
</tags>
|
||||||
<content type="html"><![CDATA[{{ .Content | plainify }}]]></content>
|
<content type="html"><![CDATA[ {{ if gt .WordCount $limit }} {{ .Plain | truncate $limit }} {{ else }} {{ .Plain }} {{ end }} ]]></content>
|
||||||
</entry>
|
</entry>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</search>
|
</search>
|
||||||
@@ -15,7 +15,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="post-body">
|
<div class="post-body">
|
||||||
{{ if eq .Data.Plural "categories" }}
|
{{ if eq .Data.Plural "categories" }}
|
||||||
{{ $categories := .Site.Taxonomies.categories }}
|
|
||||||
<div class="category-all-page">
|
<div class="category-all-page">
|
||||||
<div class="category-all-title">
|
<div class="category-all-title">
|
||||||
{{ T "Terms.categories" (.Scratch.Get "catsCount") | safeHTML }}
|
{{ T "Terms.categories" (.Scratch.Get "catsCount") | safeHTML }}
|
||||||
@@ -24,7 +23,7 @@
|
|||||||
<ul class="category-list">
|
<ul class="category-list">
|
||||||
{{ $allSecondaryCats := slice }}
|
{{ $allSecondaryCats := slice }}
|
||||||
{{ range .Site.Taxonomies.categories.ByCount }}
|
{{ range .Site.Taxonomies.categories.ByCount }}
|
||||||
{{ $primaryCategory := .Name }}
|
{{ $primaryCategory := .Page.Title }}
|
||||||
{{ $primaryCount := 0 }}
|
{{ $primaryCount := 0 }}
|
||||||
{{ $secondaryCategories := slice}}
|
{{ $secondaryCategories := slice}}
|
||||||
{{ $pages := $.Scratch.Get "pages" }}
|
{{ $pages := $.Scratch.Get "pages" }}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/* Other not useful scripts, eg: 51la widget, translate */}}
|
{{/* Other not useful scripts, eg: 51la widget, translate */}}
|
||||||
{{ with .Site.Params.siteState.statistic }}
|
{{ with .Site.Params.siteState.views }}
|
||||||
{{ if and .enable (eq .plugin "51la") }}
|
{{ if and .enable (eq .plugin "51la") }}
|
||||||
{{ $lawt := resources.Get "js/third-party/others/lawidget.js" }}
|
{{ $lawt := resources.Get "js/third-party/others/lawidget.js" }}
|
||||||
{{ $nextjs = $nextjs | append $lawt }}
|
{{ $nextjs = $nextjs | append $lawt }}
|
||||||
|
|||||||
Reference in New Issue
Block a user