aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/_default/terms.html6
2 files changed, 5 insertions, 3 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 4ebad8b..f58fdcd 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -109,6 +109,8 @@ copyright = "" # default: author.name ↓ # 默认为下面配
customCSS = []
customJS = []
+ uglyURLs = false # please keep same with uglyurls setting
+
[params.publicCDN] # load these files from public cdn # 启用公共CDN,需自行定义
enable = true
jquery = '<script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>'
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index abbc170..e76cde8 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -15,7 +15,7 @@
</div>
<div class="terms-tags">
{{ range $key, $value := $terms -}}
- <a class="terms-link" href="{{ $name | relLangURL }}/{{ $value.Term | urlize }}/">
+ <a class="terms-link" href="{{ $name | relLangURL }}/{{ $value.Term | urlize }}{{ if $.Site.Params.uglyURLs }}.html{{else}}/{{ end }}">
{{ $value.Term }}
<span class="terms-count">{{ len $value.Pages }}</span>
</a>
@@ -33,7 +33,7 @@
</div>
<div class="terms-tags">
{{- range $key, $value := $terms }}
- <a class="terms-link" href="{{ $name | relLangURL }}/{{ $value.Term | urlize }}/">
+ <a class="terms-link" href="{{ $name | relLangURL }}/{{ $value.Term | urlize }}{{ if $.Site.Params.uglyURLs }}.html{{else}}/{{ end }}">
{{ $value.Term }}
<span class="terms-count">{{ len $value.Pages }}</span>
</a>
@@ -41,4 +41,4 @@
</div>
</div>
{{- end }}
-{{- end }} \ No newline at end of file
+{{- end }}