Skip to content

Commit

Permalink
Tidy up meta tags, made titles useful, removed useless background siz…
Browse files Browse the repository at this point in the history
…e style
  • Loading branch information
omgmog committed Feb 15, 2021
1 parent 876b8ba commit cfb0562
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/_data/meta.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
url: "https://not.jsoxford.com/",
siteName: "MaybeNotJSOxford",
siteName: "JSNotOxford",
siteDescription: "A monthly catchup about tech (maybe JS), that's online (not in Oxford)",
authorName: "JS Oxford",
twitterUsername: "JSOxford", // no `@`
Expand Down
30 changes: 15 additions & 15 deletions src/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
<!DOCTYPE html>
<html lang="en">
{%- set pageTitle %}{% if title %}{{ title }} | {% endif %}{{ meta.siteName }}{% endset -%}
{%- set pageDescription %}{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}{% endset -%}
<head>
<!-- Generated from the 11ty Netlify Jumpstart: https://github.com/5t3ph/11ty-netlify-jumpstart -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{pageTitle}}</title>
<meta
name="description"
content="{{pageDescription}}"
/>
<link rel="icon" href="{{ '/favicon.png' | url }}" />
<link href="{{ '/css/style.css' | url }}" rel="stylesheet" />

<meta name="twitter:card" content="summary_large_image" />
{% if meta.twitterUsername %}
<meta name="twitter:creator" content="@{{ meta.twitterUsername }}" />
{% endif %}

{%- set pageTitle %}{% if title %}{{ title }} | {% else %}{% if description %}{{ description | safe}} | {% endif %}{% endif %}{{ meta.siteName }}{% endset -%}
<title>{{pageTitle}}</title>
<meta
name="twitter:title"
name="og:title"
content="{{pageTitle}}"
/>
<meta
name="twitter:description"
content="{{pageDescription}}"
name="twitter:title"
content="{{pageTitle}}"
/>

{%- set pageDescription %}{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}{% endset -%}
<meta
name="og:title"
content="{{pageTitle}}"
name="description"
content="{{pageDescription}}"
/>
<meta
name="og:description"
content="{{pageDescription}}"
/>
<meta property="og:image" content="{{pageSocialImg}}" />
<meta name="twitter:image" content="{{pageSocialImg}}" />
<meta
name="twitter:description"
content="{{pageDescription}}"
/>

{%- set pageSocialImg %}/previews/{% if previewslug %}{{ previewslug }}{% else %}{{ page.fileSlug }}{% endif %}.png{% endset -%}
<meta property="og:image" content="{{ pageSocialImg | url }}" />
<meta name="twitter:image" content="{{ pageSocialImg | url }}" />
Expand Down

0 comments on commit cfb0562

Please sign in to comment.