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
|
@ -36,12 +36,6 @@ enableEmoji: true
|
|||
|
||||
# Custom parameters
|
||||
params:
|
||||
# Copyright Notice
|
||||
copyright: © 2020 Copyright.
|
||||
|
||||
# Meta description for your site. This will help the search engines to find your site.
|
||||
description: Portfolio and personal blog of Jane Doe.
|
||||
|
||||
# background image of the landing page
|
||||
background: "images/background.jpg"
|
||||
|
||||
|
@ -62,25 +56,7 @@ params:
|
|||
# specify whether you want to show Table of Contents in reading page
|
||||
enableTOC: true
|
||||
|
||||
# specify the list of custom menus that you want to show in the top navbar.
|
||||
# they will be separated by a divider from the main menus.
|
||||
customMenus:
|
||||
- name: Notes
|
||||
url: https://hossainnotes.netlify.app/docs/example/
|
||||
|
||||
# Provide newsletter configuration. This feature hasn't been implemented yet.
|
||||
# Currently, you can just hide it from the footer.
|
||||
newsletter:
|
||||
enable: true
|
||||
|
||||
# some information about you
|
||||
author:
|
||||
name: "Jane Doe"
|
||||
nickname: "Jane"
|
||||
image: "images/avatar.png"
|
||||
# greeting message before your name. it will default to "Hi! I am" if not provided
|
||||
greeting: "Hi, I am"
|
||||
# give your some contact information. they will be used in the footer
|
||||
contactInfo:
|
||||
email: "janedoe@example.com"
|
||||
phone: "+0123456789"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# some information about you
|
||||
name: "Jane Doe"
|
||||
nickname: "Jane"
|
||||
# greeting message before your name. it will default to "Hi! I am" if not provided
|
||||
greeting: "Hi, I am"
|
||||
image: "images/avatar.png"
|
||||
# give your some contact information. they will be used in the footer
|
||||
contactInfo:
|
||||
|
|
11
exampleSite/data/en/site.yaml
Normal file
11
exampleSite/data/en/site.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Copyright Notice
|
||||
copyright: © 2020 Copyright.
|
||||
|
||||
# Meta description for your site. This will help the search engines to find your site.
|
||||
description: Portfolio and personal blog of Jane Doe.
|
||||
|
||||
# specify the list of custom menus that you want to show in the top navbar.
|
||||
# they will be separated by a divider from the main menus.
|
||||
customMenus:
|
||||
- name: Notes
|
||||
url: https://hossainemruz.gitbook.io/
|
|
@ -1,5 +1,10 @@
|
|||
name: "Jane Doe"
|
||||
nickname: "Jane"
|
||||
image: "images/avatar.png"
|
||||
|
||||
# greeting message before your name. it will default to "Hi! I am" if not provided
|
||||
greeting: "Bonjour, je suis"
|
||||
|
||||
# give your some contact information. they will be used in the footer
|
||||
contactInfo:
|
||||
email: "janedoe@example.com"
|
||||
|
|
11
exampleSite/data/fr/site.yaml
Normal file
11
exampleSite/data/fr/site.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Copyright Notice
|
||||
copyright: © 2020 Droits d'auteur.
|
||||
|
||||
# Meta description for your site. This will help the search engines to find your site.
|
||||
description: Portfolio et blog personnel de Jane Doe.
|
||||
|
||||
# specify the list of custom menus that you want to show in the top navbar.
|
||||
# they will be separated by a divider from the main menus.
|
||||
customMenus:
|
||||
- name: Remarques
|
||||
url: https://hossainemruz.gitbook.io/
|
|
@ -1,7 +1,4 @@
|
|||
# More documentation here: https://github.com/nicksnyder/go-i18n
|
||||
[greeting]
|
||||
other = "Hello, I am"
|
||||
|
||||
[home]
|
||||
other = "Home"
|
||||
|
||||
|
@ -24,4 +21,7 @@ other = "Enter email"
|
|||
other = "We'll never share your email with anyone else."
|
||||
|
||||
[submit]
|
||||
other = "Submit"
|
||||
other = "Submit"
|
||||
|
||||
[hugoAttributionText]
|
||||
other = "Powered by"
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
# More documentation here: https://github.com/nicksnyder/go-i18n
|
||||
[greeting]
|
||||
other = "Bonjour, je suis"
|
||||
|
||||
[home]
|
||||
other = "Accueil"
|
||||
|
||||
|
@ -24,4 +21,7 @@ other = "Entrez une adresse e-mail"
|
|||
other = "Nous ne partagerons jamais votre courriel avec quelqu'un d'autre."
|
||||
|
||||
[submit]
|
||||
other = "Envoyer"
|
||||
other = "Envoyer"
|
||||
|
||||
[hugoAttributionText]
|
||||
other = "Alimenté par"
|
||||
|
|
|
@ -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