Skip to content

Commit ae6d559

Browse files
committed
Add open graph support!
1 parent 6ce8daf commit ae6d559

File tree

8 files changed

+19
-11
lines changed

8 files changed

+19
-11
lines changed

src/_data/generalData.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"baseUrl": "https://www.reboot-codes.com",
23
"site": {
34
"title": "Reboot/Fitz"
45
},

src/_includes/layouts/base.njk

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ useContainer: true
66
<!DOCTYPE html>
77
<html lang="en">
88
<head>
9-
<meta charset="UTF-8">
10-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
9+
<meta charset="UTF-8" />
10+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1111
<title>{% include "copywriting/title.njk" %}</title>
1212
<link rel="stylesheet" href="/styles/global.css" />
1313
<link rel="icon" href="/favicon.png" />
14-
<a rel="me" href="https://mastodon.social/@reboothasmastodon"></a>
15-
<a rel="me" href="https://tiggi.es/@reboot"></a>
16-
{% if (opengraph) %}
1714
<!-- TODO: Implement opengraph for all pages. -->
18-
{% endif %}
15+
<meta property="og:title" content="{% if title %}{{ title }}{% else %}{% include "copywriting/sectionTitle.njk" %}{% endif %}" />
16+
<meta property="og:description" content="{% if description %}{{ description }}{% else %}{% if title %}{% include "copywriting/sectionTitle.njk" %}{% endif %}{% endif %}" />
17+
<meta property="og:site_name" content="{% include "copywriting/sectionTitle.njk" %}" />
18+
{% if openGraph.imgUrl %}<meta id="og:image" content="{{ openGraph.imgUrl }}" />{% endif %}
19+
<a rel="me" href="https://mastodon.social/@reboothasmastodon" style="color: rgba(0, 0, 0, 0); position: absolute;" aria-hidden="true"></a>
20+
<a rel="me" href="https://tiggi.es/@reboot" style="color: rgba(0, 0, 0, 0); position: absolute;" aria-hidden="true"></a>
1921
</head>
2022
<body>
2123
{% include "components/navigation.njk" %}

src/_includes/layouts/project.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ useContainer: true
3030
{%- for item in pagination.items %}
3131
{% if item.data.published != false %}
3232
<a id="post-{{ loop.index }}" class="post transition" href="{{ item.page.url }}">
33-
<p>{{ item.data.title }}</p>
33+
<p class="post-title">{{ item.data.title }}</p>
3434
<p>on {{ item.page.date | formatDate }}, takes {{ item.content | timeToRead }} to read.</p>
3535
</a>
3636
{% endif %}

src/index.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pagination:
1717
<div class="home-section-card-content">
1818
{%- for item in pagination.items %}
1919
<a href="{{ item.page.url }}" class="home-section-card">
20-
<h3>{{ item.data.title }}</h3>
20+
<h3 class="home-section-card-title">{{ item.data.title }}</h3>
2121
<p>{{ item.data.description }}</p>
2222
</a>
2323
{% endfor -%}

src/posts.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pagination:
3131
<div id="posts-list" class="post-list">
3232
{%- for item in pagination.items %}
3333
<a id="post-{{ loop.index }}" href="{{ item.page.url }}" class="post transition">
34-
<p>{{ item.data.title }}</p>
34+
<p class="post-title">{{ item.data.title }}</p>
3535
<p>on {{ item.page.date | formatDate }}, takes {{ item.content | timeToRead }} to read.</p>
3636
</a>
3737
{% endfor -%}

src/projects.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pagination:
1313
<div id="posts-list" class="post-list">
1414
{%- for item in pagination.items %}
1515
<a id="post-{{ loop.index }}" class="post transition" href="{{ item.page.url }}">
16-
<p>{{ item.data.title }}</p>
16+
<p class="post-title">{{ item.data.title }}</p>
1717
<p>{{ item.data.description }}</p>
1818
</a>
1919
{% endfor -%}

src/styles/home.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,8 @@
5959
flex-direction: row;
6060
}
6161
}
62+
63+
.post-title, .home-section-card-title {
64+
font-weight: bold;
65+
font-size: 1.15em;
66+
}

src/tags.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ isBlog: true
2020
<div id="taggedposts" class="tagged-posts">
2121
{% for post in (collections[ tag ] | reverse) %}
2222
<a class="tagged-post transition" href="{{ post.url }}">
23-
<p>{{ post.data.title }}</p>
23+
<p class="post-title">{{ post.data.title }}</p>
2424
<p>on {{ post.page.date | formatDate }}</p>
2525
</a>
2626
{% endfor %}

0 commit comments

Comments
 (0)