diff --git a/README.md b/README.md index 2419d6a..4e58cd8 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ To enable DISQUS comments, add `disqusShortname = YOURSHORTNAME` to your config For any page or post you can add a featured image by including the local path in front matter (see content in the `exampleSite/content/_readme.md` file for examples): `featured_image: '/images/gohugo-default-sample-hero-image.jpg'` +If you would like to hide the header text on the featured image on a page, set `omit_header_text` to `true`. See `exampleSite/content/contact.md` for an example. + You don't need an image though. The default background color is black, but you can change the color, by changing the default color class in the config.toml file. Choose a background color from any on the [Tachyons](http://tachyons.io/docs/themes/skins/) library site, and preface it with "bg-" example: `background_color_class = "bg-blue"` or `background_color_class = "bg-gray"` diff --git a/exampleSite/content/contact.md b/exampleSite/content/contact.md index 2bea23d..d02ba18 100644 --- a/exampleSite/content/contact.md +++ b/exampleSite/content/contact.md @@ -1,5 +1,7 @@ --- title: Contact +featured_image: "images/notebook.jpg" +omit_header_text: true description: We'd love to hear from you type: page menu: diff --git a/exampleSite/static/images/notebook.jpg b/exampleSite/static/images/notebook.jpg new file mode 100644 index 0000000..934af26 Binary files /dev/null and b/exampleSite/static/images/notebook.jpg differ diff --git a/layouts/partials/page-header.html b/layouts/partials/page-header.html index 6d638d2..8cd6d4f 100644 --- a/layouts/partials/page-header.html +++ b/layouts/partials/page-header.html @@ -6,11 +6,13 @@
{{ partial "site-navigation.html" . }}
-

{{ .Title | default .Site.Title }}

- {{ with .Params.description }} -

- {{ . }} -

+ {{ if not .Params.omit_header_text }} +

{{ .Title | default .Site.Title }}

+ {{ with .Params.description }} +

+ {{ . }} +

+ {{ end }} {{ end }}