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

github.com/siegerts/hugo-theme-basic.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Siegert <stephen.siegert@sas.com>2019-02-15 18:24:24 +0300
committerStephen Siegert <stephen.siegert@sas.com>2019-02-15 18:24:24 +0300
commite6e0aa7f96ba81ca01f04212706fdd6943ca8b13 (patch)
treed42e34e8741cfb10da490339f59ced6db70844e3
parent27273ca6f07ac9da38e26f5f5e9584351dc57cd8 (diff)
add enableEmoji to theme config and replace .Site.Params.TitleEmoji with code
-rw-r--r--.prettierignore1
-rw-r--r--exampleSite/config.toml3
-rw-r--r--layouts/index.html4
3 files changed, 5 insertions, 3 deletions
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..a341175
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1 @@
+*/*.html \ No newline at end of file
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 2eb8ac4..9d5a272 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -3,10 +3,11 @@ title = "Example"
theme ="hugo-theme-basic"
languageCode = "en-us"
googleAnalytics = ""
+enableEmoji = true
copyright = "© 2016-19 Example"
[params]
- titleEmoji = "🎉"
+ titleEmoji = ":tada:"
twitter = "exampleHandle"
[Permalinks]
diff --git a/layouts/index.html b/layouts/index.html
index da1f073..99ba999 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -28,12 +28,12 @@
<section id="main">
<div>
<h1 id="title" class="f3">
- {{.Site.Title}} {{ .Site.Params.TitleEmoji }}
+ {{ .Site.Title }} {{ emojify .Site.Params.TitleEmoji }}
</h1>
<ul class="list pl0">
<!-- pages -->
<!-- prettier-ignore -->
- {{ range.Site.Params.menu }}
+ {{ range .Site.Params.menu }}
<li class="b mv3">
<a class="f3 b pa1 black" href="{{ .url }}">{{ .name }}</a>
</li>