Move customMenus and other site related config into data section
This commit is contained in:
parent
faa91755f9
commit
9f923f97d3
10 changed files with 56 additions and 47 deletions
|
@ -8,6 +8,14 @@
|
|||
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }}
|
||||
{{ end }}
|
||||
|
||||
{{ $copyrightNotice := "© 2020 Copyright."}}
|
||||
{{ if (index .Site.Data .Site.Language.Lang).site }}
|
||||
{{ $siteConfig := (index .Site.Data .Site.Language.Lang).site }}
|
||||
{{ if $siteConfig.copyright }}
|
||||
{{ $copyrightNotice = $siteConfig.copyright }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<footer class="container-fluid text-center align-content-center footer pb-2">
|
||||
<div class="container pt-5">
|
||||
<div class="row text-left">
|
||||
|
@ -68,9 +76,9 @@
|
|||
Toha
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">{{ if .Site.Params.copyright }}{{ .Site.Params.copyright }}{{ else }}© 2020 Copyright.{{ end }}</div>
|
||||
<div class="col-md-4 text-center">{{ $copyrightNotice }}</div>
|
||||
<div class="col-md-4 text-right">
|
||||
<a id="hugo" href="https://gohugo.io/">Powered by Hugo
|
||||
<a id="hugo" href="https://gohugo.io/">{{ i18n "hugoAttributionText" }}
|
||||
<img
|
||||
src="/assets/images/hugo-logo-wide.svg"
|
||||
alt="Hugo Logo"
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<a class="nav-link" id="blog-link" href="/posts">Posts</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ range site.Params.customMenus }}
|
||||
{{ range (index .Site.Data .Site.Language.Lang).site.customMenus }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ .url }}">{{ .name }}</a>
|
||||
</li>
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
{{ $greeting:="Hi! I am" }}
|
||||
{{ if .Site.Params.author.greeting }}
|
||||
{{ $greeting = .Site.Params.author.greeting }}
|
||||
{{ end }}
|
||||
{{ $name:="Jane Doe" }}
|
||||
{{ if .Site.Params.author.nickname }}
|
||||
{{ $name = .Site.Params.author.nickname }}
|
||||
{{ else if .Site.Params.author.name }}
|
||||
{{ $name = .Site.Params.author.name }}
|
||||
{{ end }}
|
||||
|
||||
{{ $author:= .Site.Data.author }}
|
||||
{{ if (index .Site.Data .Site.Language.Lang).author }}
|
||||
{{ $author = (index .Site.Data .Site.Language.Lang).author }}
|
||||
{{ end }}
|
||||
|
||||
{{ $name:="Jane Doe" }}
|
||||
{{ if $author.nickname }}
|
||||
{{ $name = $author.nickname }}
|
||||
{{ else if $author.name }}
|
||||
{{ $name = $author.name }}
|
||||
{{ end }}
|
||||
|
||||
{{ $sections:= .Site.Data.sections }}
|
||||
{{ if (index .Site.Data .Site.Language.Lang).sections }}
|
||||
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }}
|
||||
|
@ -38,7 +34,7 @@
|
|||
<img src="{{ $authorImage | absURL }}"
|
||||
class="rounded-circle mx-auto d-block img-fluid"
|
||||
/>
|
||||
<h1 class="greeting"> {{ $greeting }} {{ $name }}</h1>
|
||||
<h1 class="greeting"> {{ $author.greeting }} {{ $name }}</h1>
|
||||
<div class="typing-carousel">
|
||||
<span id="ityped" class="ityped"></span>
|
||||
<span class="ityped-cursor"></span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue