Add site.baseurl variable to fix OG image previews

This commit is contained in:
Emilio Coppola
2023-01-16 19:41:48 +01:00
parent 388176494b
commit a283df1e22
3 changed files with 7 additions and 5 deletions

View File

@@ -2,6 +2,8 @@
exclude: [".github", "Gemfile", "Gemfile.lock", "build.sh", "build-and-serve.sh", "README.md"]
permalink: pretty
baseurl: "https://godotengine.org"
collections_dir: collections
collections:
article:

View File

@@ -8,12 +8,12 @@
<meta name="description" content="{{ page.description | default: 'Free and open source 2D and 3D game engine' }}">
<meta name="theme-color" content="#3d8fcc">
<meta property="og:site_name" content="Godot Engine">
<meta property="og:url" content="https://godotengine.org">
<meta property="og:url" content="{{ site.baseurl }}">
<meta name="twitter:site" content="@godotengine">
<meta property="og:title" content="{{ page.title | default: 'Godot Engine' }}">
<meta property="og:description" content="{{ page.description | default: 'Free and open source 2D and 3D game engine' }}">
<meta property="og:image" content="{{ page.image | default: '/assets/og_image.png' }}">
<meta property="og:image" content="{{ site.baseurl }}{{ page.image | default: '/assets/og_image.png' }}">
<meta property="og:type" content="{{ page.og_type | default: 'website' }}">
<meta name="twitter:card" content="summary_large_image">
<title>{{ page.title | default: "Godot Engine" }}</title>

View File

@@ -7,15 +7,15 @@ permalink: /rss.xml
<channel>
<title>Godot Engine Official</title>
<link>https://godotengine.org</link>
<link>{{ site.baseurl }}</link>
<description>Godot is a 2D and 3D free and open source game engine developed by a community of contributors. It provides a huge set of common tools, so you can just focus on making your game without reinventing the wheel.</description>
<atom:link href="https://godotengine.org/rss.xml" rel="self" type="application/rss+xml" />
<atom:link href="{{ site.baseurl }}/rss.xml" rel="self" type="application/rss+xml" />
{% assign latest_posts = site.article | sort:"date" | reverse %}
{% for post in latest_posts limit:24 %}
<item>
<title>{{ post.title }}</title>
<link>https://godotengine.org{{ post.url }}</link>
<link>{{ site.baseurl }}{{ post.url }}</link>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %X +0000" }}</pubDate>
</item>