Add theme-color tag in header (defined by themecolor param)

This commit is contained in:
Ethan Madison 2015-05-10 23:47:02 -07:00
parent 883da9dc3a
commit a741672bdf
2 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,7 @@ copyright = "© Copyright notice"
bio = "Your short bio/tagline" bio = "Your short bio/tagline"
# Short subtitle/tagline. This is displayed in the header. # Short subtitle/tagline. This is displayed in the header.
subtitle = "is a software developer, hardware hacker and a beer lover. He believes in the power of code." subtitle = "is a software developer, hardware hacker and a beer lover. He believes in the power of code."
themecolor = "#hexcolor" # Defines the tab color in Chrome for Android.
``` ```
## Usage ## Usage

View File

@ -3,6 +3,9 @@
<head prefix="og: http://ogp.me/ns#"> <head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
{{ with .Site.Params.themecolor }}
<meta name="theme-color" content="{{ . }}" />
{{ end }}
<meta property="og:title" content="{{ if ne .Url "/" }} {{ .Title }} &middot; {{ end }} {{ .Site.Title }}" /> <meta property="og:title" content="{{ if ne .Url "/" }} {{ .Title }} &middot; {{ end }} {{ .Site.Title }}" />
<meta property="og:site_name" content="{{ .Site.Title }}" /> <meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:url" content="{{ .Permalink }}" /> <meta property="og:url" content="{{ .Permalink }}" />