mirror of https://github.com/luizdepra/hugo-coder.git

Jeffrey C
04.43.2019 944092c2254c344507485b58ff87e5eaeffc80d4
Add OpenGraph to each page (#147)

OpenGraph Protocol is used by sites like Facebook to display a rich object in a social graph.

* Add OpenGraph Protocol to each page

Hugo has an internal template for [Open Graph](https://gohugo.io/templates/internal/#open-graph). It takes necessary information from either site's or post's config thus it makes sense to add it to each page.

* Add 'series' to posts archetype
This taxonomy is used to specify related “see also” pages by placing them in the same series.

* Add series taxonomy to exampleSite config.

* Add example of series to exampleSite

* Add spaz926 to Contributors
7 files modified
11 ■■■■■ changed files
CONTRIBUTORS.md 3 ●●●● patch | view | raw | blame | history
archetypes/posts.md 1 ●●●● patch | view | raw | blame | history
exampleSite/config.toml 3 ●●●●● patch | view | raw | blame | history
exampleSite/content/posts/goisforlovers.md 1 ●●●● patch | view | raw | blame | history
exampleSite/content/posts/hugoisforlovers.md 1 ●●●● patch | view | raw | blame | history
exampleSite/content/posts/migrate-from-jekyll.md 1 ●●●● patch | view | raw | blame | history
layouts/_default/baseof.html 1 ●●●● patch | view | raw | blame | history
CONTRIBUTORS.md
@@ -29,4 +29,5 @@
- [Piotr Januszewski](https://piojanu.github.io)
- [Artem Khvastunov](https://artspb.me)
- [Gabriel Nepomuceno] (https://blog.nepomuceno.me)
- [Salvatore Giordano] (https://salvatore-giordano.github.io)
- [Salvatore Giordano] (https://salvatore-giordano.github.io)
- [Jeffrey Carpenter](https://uvolabs.me)
archetypes/posts.md
@@ -7,4 +7,5 @@
tags = []
categories = []
externalLink = ""
series = []
+++
exampleSite/config.toml
@@ -39,6 +39,9 @@
    # Custom CSS
    custom_css = []
[taxonomies]
  series = "series"
[[params.social]]
    name = "Github"
    icon = "fab fa-github"
exampleSite/content/posts/goisforlovers.md
@@ -13,6 +13,7 @@
    "Development",
    "golang",
]
series = ["Getting Started"]
+++
Hugo uses the excellent [go][] [html/template][gohtmltemplate] library for
exampleSite/content/posts/hugoisforlovers.md
@@ -11,6 +11,7 @@
    "Development",
    "golang",
]
series = ["Getting Started"]
+++
## Step 1. Install Hugo
exampleSite/content/posts/migrate-from-jekyll.md
@@ -2,6 +2,7 @@
date = "2014-03-10"
title = "Migrate to Hugo from Jekyll"
description = "The post explains how to migrate from from Jekyll to Hugo."
series = ["Getting Started"]
+++
Table of Contents
layouts/_default/baseof.html
@@ -10,6 +10,7 @@
    {{ with .Site.Params.keywords }}<meta name="keywords" content="{{ . }}">{{ end }}
    {{ template "_internal/twitter_cards.html" . }}
    {{ template "_internal/opengraph.html" . }}
    <base href="{{ .Permalink }}">
    <title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>