Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/josephhutch/aether.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Hutchinson <hutch7995@gmail.com>2020-07-15 07:09:18 +0300
committerJoe Hutchinson <hutch7995@gmail.com>2020-07-15 07:09:18 +0300
commit66876e43de81542e411a0b482b4c256b6006cd2f (patch)
tree9ed5711e7aed3ee1c9314963dde6af0259fa1dc1
parent0b275717d39cba521ad63482bae97252fd0ede14 (diff)
Clean up meta tags
-rw-r--r--README.md4
-rw-r--r--exampleSite/layouts/partials/meta-tags.html (renamed from exampleSite/layouts/partials/ogp.html)6
-rw-r--r--exampleSite/layouts/partials/twitter.html6
-rw-r--r--layouts/partials/head.html11
4 files changed, 12 insertions, 15 deletions
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/ogp.html b/exampleSite/layouts/partials/meta-tags.html
index d2164e8..2f21e36 100644
--- a/exampleSite/layouts/partials/ogp.html
+++ b/exampleSite/layouts/partials/meta-tags.html
@@ -5,3 +5,9 @@
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:site_name" content="{{ .Site.Params.Brand }}">
<meta property="og:image" content="{{ .Site.Params.metaImage | absURL }}">
+<meta name="twitter:card" content="summary">
+<meta name="twitter:title" content="{{ .Site.Params.Brand }}">
+<meta name="twitter:description" content="{{ .Site.Params.description }}">
+<meta name="twitter:site" content="{{ .Site.BaseURL }}">
+<meta name="twitter:creator" content="{{ .Site.Params.metaCreator }}">
+<meta name="twitter:image" content="{{ .Site.Params.metaImage | absURL }}">
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 @@
-<meta name="twitter:card" content="summary">
-<meta name="twitter:title" content="{{ .Site.Params.Brand }}">
-<meta name="twitter:description" content="{{ .Site.Params.description }}">
-<meta name="twitter:site" content="{{ .Site.BaseURL }}">
-<meta name="twitter:creator" content="{{ .Site.Params.metaCreator }}">
-<meta name="twitter:image" content="{{ .Site.Params.metaImage | absURL }}">
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") -}}
<link rel="mask-icon" href="{{ "/safari-pinned-tab.svg" | absURL }}" color="#5bbad5">
{{ 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 -}}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
@@ -33,10 +30,10 @@
{{ $style := slice $fontStyle $mainStyle $overrideStyle | resources.Concat "css/concated.css" | minify }}
<link href="{{ $style.Permalink }}" rel="stylesheet">
{{ range .AlternativeOutputFormats -}}
- {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+ <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
{{ template "_internal/google_analytics.html" . }}
- {{ with resources.Get $.Site.Params.bgimg -}}
+ {{ with resources.Get .Site.Params.bgimg -}}
<style>
body {
background: #ecedef url("{{ .Permalink | safeCSS }}") repeat;