Merge pull request #30 from younsl/config/support-toggle-footer

feat(config): Support toggle option for footer display
This commit is contained in:
Hanwen Guo 2024-11-30 21:10:16 -07:00 committed by GitHub
commit 1096ed99f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 21 deletions

View File

@ -1,7 +1,7 @@
[module]
[module.hugoVersion]
extended=true
min = "0.41.0"
extended = true
min = "0.41.0"
[markup]
[markup.goldmark]
@ -9,28 +9,31 @@
[markup.goldmark.parser.attribute]
block = true
title = true
[markup.highlight]
anchorLineNos = false
codeFences = true
guessSyntax = false
hl_Lines = ''
hl_inline = false
lineAnchors = ''
lineNoStart = 1
lineNos = false
anchorLineNos = false
codeFences = true
guessSyntax = false
hl_Lines = ''
hl_inline = false
lineAnchors = ''
lineNoStart = 1
lineNos = false
lineNumbersInTable = true
noClasses = true
noHl = false
style = 'rrt'
tabWidth = 4
noClasses = true
noHl = false
style = 'rrt'
tabWidth = 4
[markup.tableOfContents]
startLevel = 2
endLevel = 3
ordered = false
endLevel = 3
ordered = false
[params]
[params.theme_config]
appearance = "auto"
back_home_text = ".."
date_format = "2006-01-02"
appearance = "auto"
back_home_text = ".."
date_format = "2006-01-02"
isListGroupByDate = false
isShowFooter = true

View File

@ -1,2 +1,10 @@
{{ $footerContent := readFile "layouts/footer.md" }}
{{ $footerContent | markdownify }}
{{ if site.Params.theme_config.isShowFooter }}
{{ with resources.Get "layouts/footer.md" }}
{{ .Content | markdownify }}
{{ else }}
{{ warnf "layouts/footer.md file is not found, fallback to the default copyright" }}
<footer class="site-footer">
<p>&copy; {{ now.Format "2006" }} {{ site.Title }}</p>
</footer>
{{ end }}
{{ end }}