From 66876e43de81542e411a0b482b4c256b6006cd2f Mon Sep 17 00:00:00 2001 From: Joe Hutchinson Date: Wed, 15 Jul 2020 00:09:18 -0400 Subject: Clean up meta tags --- README.md | 4 ++-- exampleSite/layouts/partials/meta-tags.html | 13 +++++++++++++ exampleSite/layouts/partials/ogp.html | 7 ------- exampleSite/layouts/partials/twitter.html | 6 ------ layouts/partials/head.html | 11 ++++------- 5 files changed, 19 insertions(+), 22 deletions(-) create mode 100644 exampleSite/layouts/partials/meta-tags.html delete mode 100644 exampleSite/layouts/partials/ogp.html delete mode 100644 exampleSite/layouts/partials/twitter.html diff --git a/README.md b/README.md index db19dd7..76aec33 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ To change the heading and subtext at the top of list pages just add a \_index.md --- title: "This is the main heading text in big letters" date: the date -description: "This is the subtext above the main heading in small letters" +description: "This is the subtext below the main heading in smaller letters" --- ``` #### Overriding CSS @@ -136,7 +136,7 @@ To override CSS, you should create file `project_root/assets/css/override.css` a ### Custom Meta Tags -You can add optional Open Graph and Twitter meta tags by adding `project_root/layouts/partials/ogp.html` and `project_root/layouts/partials/twitter.html`. +You can add optional Open Graph, Twitter, or other meta tags by adding `project_root/layouts/partials/meta-tags.html` Refer to [/exampleSite/layouts/partials](/exampleSite/layouts/partials) for sample meta configs. ## Helpful Links diff --git a/exampleSite/layouts/partials/meta-tags.html b/exampleSite/layouts/partials/meta-tags.html new file mode 100644 index 0000000..2f21e36 --- /dev/null +++ b/exampleSite/layouts/partials/meta-tags.html @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/exampleSite/layouts/partials/ogp.html b/exampleSite/layouts/partials/ogp.html deleted file mode 100644 index d2164e8..0000000 --- a/exampleSite/layouts/partials/ogp.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/exampleSite/layouts/partials/twitter.html b/exampleSite/layouts/partials/twitter.html deleted file mode 100644 index fc52000..0000000 --- a/exampleSite/layouts/partials/twitter.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 4dae5fd..2cc1e91 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -19,11 +19,8 @@ {{ if (fileExists "static/safari-pinned-tab.svg") -}} {{ end -}} - {{ if (fileExists "layouts/partials/twitter.html") -}} - {{ partial "twitter.html" . }} - {{ end -}} - {{ if (fileExists "layouts/partials/ogp.html") -}} - {{ partial "ogp.html" . }} + {{ if (fileExists "layouts/partials/meta-tags.html") -}} + {{ partial "meta-tags.html" . }} {{ end -}} @@ -33,10 +30,10 @@ {{ $style := slice $fontStyle $mainStyle $overrideStyle | resources.Concat "css/concated.css" | minify }} {{ range .AlternativeOutputFormats -}} - {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} {{ template "_internal/google_analytics.html" . }} - {{ with resources.Get $.Site.Params.bgimg -}} + {{ with resources.Get .Site.Params.bgimg -}}