Skip to content

Commit 623c9db

Browse files
authored
improving site metadata tags (USRSE#742)
Signed-off-by: vsoch <[email protected]> Co-authored-by: vsoch <[email protected]>
1 parent c828ad5 commit 623c9db

File tree

4 files changed

+42
-14
lines changed

4 files changed

+42
-14
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ group :jekyll_plugins do
1010
gem "jekyll-feed", "~> 0.6"
1111
gem "jekyll-sitemap"
1212
gem "jekyll-paginate"
13-
gem "jekyll-seo-tag"
1413
end
1514

_config.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
lang: en
33

44
title: US-RSE
5-
description: Association of Research Software Engineers
5+
description: United States Research Software Engineer Association
66

77
url: ""
88
baseurl: "" # for testing, also check .circleci/circle_urls.sh
@@ -33,11 +33,14 @@ twitter: us_rse
3333
github_org: USRSE
3434
linkedin: company/us-rse/
3535

36+
# Twitter card for meta tags
37+
twitter_card: summary
38+
39+
3640
plugins:
3741
- jekyll-sitemap
3842
- jekyll-paginate
3943
- jekyll-feed
40-
- jekyll-seo-tag
4144

4245
exclude:
4346
- Gemfile

_includes/head.html

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,15 @@
33
<meta name="viewport" content="width=device-width, initial-scale=1">
44
<meta name="theme-color" content={{ site.theme_color | default: '#ffffff' }}>
55
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css">
6-
<link rel="shortcut icon" type="image/png"
7-
{% if site.favicon %} href="{{ site.favicon | relative_url }}" {% else %} href="{{ site.baseurl }}/favicon.png" {% endif %}
8-
/>
6+
<link rel="shortcut icon" type="image/png" {% if site.favicon %} href="{{ site.favicon | relative_url }}" {% else %} href="{{ site.baseurl }}/favicon.png" {% endif %}/>
97
<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js" defer></script>
108
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css">
119
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/reboot.css">
1210
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/bootstrap.css">
1311

1412
{% if page.redirect %}<meta http-equiv="refresh" content="0;url={{ site.baseurl }}{{ page.redirect }}"/>{% endif %}
15-
{% unless site.hide_share_buttons %}
16-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma-social@1/bin/bulma-social.min.css">
17-
{% endunless %}
18-
{% seo %}
19-
{%- if site.google_analytics -%}
20-
{%- include google-analytics.html -%}
21-
{%- endif -%}
22-
{%- include head-scripts.html -%}
13+
{% unless site.hide_share_buttons %}<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma-social@1/bin/bulma-social.min.css">{% endunless %}
14+
{% include metatags.html %}
15+
{% if site.google_analytics %}{% include google-analytics.html %}{%- endif -%}
16+
{% include head-scripts.html %}
2317
</head>

_includes/metatags.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
<!-- Social: Facebook / Open Graph -->
3+
<title>{{ site.title }} | {{ site.description }}</title>
4+
<link rel="canonical" href="{{ site.domain }}" />
5+
{% if page.id %}<meta property="og:type" content="article">
6+
<meta property="article:author" content="{% if page.posted_by %}{{ page.posted_by }}United States Research Software Engineer Association{% endif %}">
7+
{% if page.category %}<meta property="article:section" content="{{ page.category }}">{% endif %}
8+
<meta property="article:tag" content="{% if page.keywords %}{{ page.keywords }}{% else %}rseng, research software, professional society{% endif %}">
9+
<meta property="article:published_time" content="{{ page.date }}">
10+
{% else %}<meta property="og:type" content="website">{% endif %}
11+
12+
<meta property="og:url" content="{{ site.domain }}{{ site.baseurl }}{{ page.url }}">
13+
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
14+
<meta property="og:image" content="{% if page.image %}{{ site.domain }}{{ page.image }}{% else %}{{ site.domain }}{{ site.twitter-img }}{% endif %}">
15+
<meta property="og:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
16+
<meta property="og:site_name" content="{{ site.title }}">
17+
<meta property="og:locale" content="en_US">
18+
19+
<!-- Social: Twitter -->
20+
<meta name="twitter:card" content="{{ site.twitter_card }}">
21+
<meta name="twitter:site" content="@{{ site.twitter }}">
22+
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
23+
<meta name="twitter:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
24+
{% if page.image %}<meta name="twitter:image" content="{{ site.domain }}{{ page.image }}">{% else %}<meta name="twitter:image" content="{{ site.domain }}{{ site.twitter-img }}">{% endif %}
25+
26+
<!-- Social: Google+ / Schema.org -->
27+
<meta itemprop="name" content="{{ page.title }}">
28+
<meta itemprop="description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
29+
<meta itemprop="image" content="{% if page.image %}{{ site.domain }}{{ page.image }}{% else %}{{ site.domain }}{{ site.twitter-img }}{% endif %}">
30+
<script type="application/ld+json">
31+
{"@type":"WebSite","headline":"{{ site.title }}{% if page.title %} | {{ page.title }}{% endif %}","url":"{{ site.domain }}{{ page.url }}","description":"{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}","name":"{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}","@context":"https://schema.org"}
32+
</script>

0 commit comments

Comments
 (0)