Skip to content

Commit 58a61d0

Browse files
committed
Added metadata for sharing
1 parent 4bc0e1f commit 58a61d0

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

.github/workflows/deploy-cloudflare.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ jobs:
1919
id: extract-branch
2020
- name: Install gems
2121
run: bundle install
22+
- name: Calculate branch alias URL
23+
if: steps.extract-branch.outputs.branch != 'main'
24+
uses: schnerring/[email protected]
25+
id: pages-branch-alias
26+
with:
27+
git-branch: ${{ steps.extract-branch.outputs.branch }}
28+
- name: Set Jekyll URL
29+
if: steps.extract-branch.outputs.branch != 'main'
30+
uses: mikefarah/[email protected]
31+
with:
32+
cmd: yq -i '.url = "https://${{ steps.pages-branch-alias.outputs.branch-alias }}.beh-uk.pages.dev"' '_config.yml'
2233
- name: Build website (non-production)
2334
if: steps.extract-branch.outputs.branch != 'main'
2435
run: bundle exec jekyll build --drafts --future

_assets/img/og-square.png

15 KB
Loading

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
url: https://www.beh.uk
12
language: "en-GB"
23
logo: "beh.svg"
34
permalink: /:year/:title

_includes/head.html

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
- reset
1010
- main
1111
{% endminibundle %}
12+
<meta property="og:title" content="{{ page.title }}">
13+
<meta property="og:type" content="website">
14+
<meta property="og:image" content="{{ site.url }}/{% ministamp { source_path: '_assets/img/og-square.png', destination_path: 'assets/img/og-square.png' } %}">
15+
<meta property="og:url" content="{{ site.url }}{{page.url}}">
16+
<meta name="twitter:card" content="summary_large_image">
17+
<meta name="twitter:title" content="{{ page.title }}">
18+
<meta name="twitter:image" content="{{ site.url }}/{% ministamp { source_path: '_assets/img/og-square.png', destination_path: 'assets/img/og-square.png' } %}">
19+
<meta property="twitter:url" content="{{ site.url }}{{page.url}}">
1220
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.beh.uk/img/apple-touch-icon.png">
1321
<link rel="icon" type="image/png" sizes="32x32" href="https://cdn.beh.uk/img/favicon-32x32.png">
1422
<link rel="icon" type="image/png" sizes="16x16" href="https://cdn.beh.uk/img/favicon-16x16.png">

0 commit comments

Comments
 (0)