Merge pull request #30 from younsl/config/support-toggle-footer
feat(config): Support toggle option for footer display
This commit is contained in:
commit
1096ed99f6
41
config.toml
41
config.toml
@ -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
|
||||
|
@ -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>© {{ now.Format "2006" }} {{ site.Title }}</p>
|
||||
</footer>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user