Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vaga/hugo-theme-m10c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--exampleSite/config.toml4
-rw-r--r--layouts/_default/baseof.html6
3 files changed, 7 insertions, 5 deletions
diff --git a/README.md b/README.md
index 1b67988..c506cd3 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@ To add a social link, add the following lines in `params`:
```
[[params.social]]
- name = "github"
+ icon = "github"
url = "https://github.com/vaga"
```
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index c551e8d..b3c9036 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -19,10 +19,10 @@ paginate = 5
description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vehicula turpis sit amet elit pretium."
menu_item_separator = " - "
[[params.social]]
- name = "github"
+ icon = "github"
url = "https://github.com/gohugoio"
[[params.social]]
- name = "twitter"
+ icon = "twitter"
url = "https://twitter.com/gohugoio"
# Brown theme
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index cccdf56..d4fb410 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -31,11 +31,13 @@
</nav>
{{- end }}
<p>{{ .Site.Params.description | default "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vehicula turpis sit amet elit pretium." }}</p>
+ {{- with .Site.Params.social }}
<div class="app-header-social">
- {{ range .Site.Params.social }}
- <a target="_blank" href="{{ .url }}" rel="noreferrer noopener">{{ partial "icon.html" (dict "ctx" $ "name" .name ) }}</a>
+ {{ range . }}
+ <a href="{{ .url }}" target="_blank" rel="noreferrer noopener">{{ partial "icon.html" (dict "ctx" $ "name" .icon) }}</a>
{{ end }}
</div>
+ {{- end }}
</header>
<main class="app-container">
{{ block "main" . }}