diff options
author | Felix Börner <escalate@users.noreply.github.com> | 2018-04-23 08:35:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-23 08:35:14 +0300 |
commit | 3f0f3e4924681c90aa6b179794575a084d7ac431 (patch) | |
tree | 7daa3737c98a6fbb5d7c61032b192a7426b42d18 | |
parent | f5739e157f137aeac6a8831a529a81a82f297d2e (diff) | |
parent | e9c7cc5c2fdc70603571516137d85bfaefbd4390 (diff) |
Merge pull request #2 from paskal/master
Set defaults for unset variables
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | layouts/index.html | 4 | ||||
-rw-r--r-- | layouts/partials/bio.html | 2 | ||||
-rw-r--r-- | layouts/partials/links.html | 2 |
5 files changed, 11 insertions, 9 deletions
@@ -49,7 +49,7 @@ You can either use a video that you host or one that is on YouTube. ##### Use your own video -Add your video to the `static` folder and change `file` to the location of your video accordingly. Make sure you delete `youtubeId` or comment it out. +Add your video to the `static` folder and change `file` to the location of your video accordingly. Make sure you delete `youtubeId` or comment it out. ```toml [[params.visual.image]] @@ -64,7 +64,7 @@ Add your video to the `static` folder and change `file` to the location of your ##### Use a YouTube video -Get the ID of the YouTube video and add it to `youtubeId`. Make sure you delete `file` or comment it out. +Get the ID of the YouTube video and add it to `youtubeId`. Make sure you delete `file` or comment it out. ```toml [[params.visual.image]] @@ -105,15 +105,15 @@ This is what generates one link list: [[params.links]] [params.links.list1] heading = "Connect" - + [[params.links.list1.link]] text = "Blog" url = "#" - + [[params.links.list1.link]] text = "Email" url = "#" - + [[params.links.list1.link]] text = "Newsletter" url = "#" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 65bcd6b..4cd08de 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -9,7 +9,7 @@ disableKinds = ["page", "section", "taxonomy", "taxonomyTerm", "RSS", "sitemap", googleAnalytics = "" # Copyright -copyright = "©2017 Your Name" +copyright = "©2018 Your Name" [params] diff --git a/layouts/index.html b/layouts/index.html index 003ce0f..9a23946 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang="{{ .Site.LanguageCode }}"> +<html lang="{{ default .Site.LanguageCode "en-US" }}"> <head> {{ partial "head" . }} @@ -11,7 +11,7 @@ <!-- Image --> {{ if .Site.Params.visual.image.enable }} - + <div class="split-image"> </div> diff --git a/layouts/partials/bio.html b/layouts/partials/bio.html index ee78306..e39e137 100644 --- a/layouts/partials/bio.html +++ b/layouts/partials/bio.html @@ -1,3 +1,5 @@ +{{ if .Site.Params.content.bio }} <div class="split-bio"> <p>{{ .Site.Params.content.bio | markdownify }}</p> </div> +{{ end }} diff --git a/layouts/partials/links.html b/layouts/partials/links.html index 57f3510..f0e9b40 100644 --- a/layouts/partials/links.html +++ b/layouts/partials/links.html @@ -2,7 +2,7 @@ {{ range $key, $value := .Site.Params.links }} {{ range $key, $list := $value }} - + {{ if $list.link }} <div class="split-list"> <h3>{{ $list.heading }}</h3> |