Меняю ToC
All checks were successful
/ site (push) Successful in 0s

This commit is contained in:
Артём 2024-06-15 21:21:07 +03:00
parent c259a51818
commit 55c9054af8
Signed by: SadmL
GPG key ID: EEFBB39006B28920
2 changed files with 8 additions and 3 deletions

View file

@ -3,12 +3,17 @@ baseurl = ""
theme = "hugo-theme-terminal"
paginate = 5
DefaultContentLanguage = "ru"
#defaultContentLanguageInSubdir = true
# defaultContentLanguageInSubdir = true
# enableGitInfo = true
# [frontmatter]
# lastmod = ['lastmod', ':git', 'date', 'publishDate']
[markup]
[markup.tableOfContents]
endLevel = 4
ordered = false
startLevel = 1
[params]
# dir name of your main content (default is `content/posts`).
@ -57,7 +62,7 @@ DefaultContentLanguage = "ru"
# set title for the table of contents
# can be overridden in a page's front-matter
# TocTitle = "Table of Contents" # default
# TocTitle = "Содержание" # default
[languages.ru]
languageCode = 'ru'

View file

@ -1,5 +1,5 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
{{- if and (ge .Level 2) (le .Level 4) }}{{" " -}}
{{- if and (ge .Level 1) (le .Level 4) }}{{" " -}}
<a class="header-link" href="#{{ .Anchor | safeURL }}"><span>&#8983</span></a>
{{- end -}}
</h{{ .Level }}>