From a229d82107f755914e7bcba762ebcbb36d5f4764 Mon Sep 17 00:00:00 2001 From: Ivaylo Draganov Date: Fri, 28 May 2021 15:27:12 +0300 Subject: [PATCH] Add titles to pages and print them in the head This also changes and moves the global site.title and site.description variables. These variables are intended for use as global site properties and should not be limited to just the feed. --- 404.html | 1 + _config.yml | 9 +++++---- _includes/head.html | 9 ++++++++- about.html | 1 + community.html | 1 + download.html | 1 + games.html | 1 + legal.html | 1 + news/index.html | 1 + players.html | 1 + 10 files changed, 21 insertions(+), 5 deletions(-) diff --git a/404.html b/404.html index d0dbe85..2e90fdf 100644 --- a/404.html +++ b/404.html @@ -1,4 +1,5 @@ --- +title: "Page Not Found" permalink: /404.html --- diff --git a/_config.yml b/_config.yml index ffeb37d..d422d47 100644 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,11 @@ # General configuration url: "https://www.openra.net" baseurl: "" +title: OpenRA +description: >- + OpenRA is an open source project that recreates and modernizes classic real time strategy games, like Red Alert, Command & Conquer, and Dune 2000. +tagline: >- + Classic strategy games rebuilt for the modern era twitter_username: OpenRA github_username: OpenRA permalink: /:categories/:title/index.html @@ -28,10 +33,6 @@ plugins: - jekyll-github-metadata # jekyll-feed configuration -title: OpenRA - News Feed -description: >- # this means to ignore newlines until "baseurl:" - Classic strategy games rebuilt for the modern era - feed: path: /news/atom/index.xml diff --git a/_includes/head.html b/_includes/head.html index f7b6091..48a231d 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -19,7 +19,14 @@ - OpenRA - Classic strategy games rebuilt for the modern era + {% capture page_title %} + {% if page.title %} + {{ page.title }} | {{ site.title }} + {% else %} + {{ site.title }} - {{ site.tagline }} + {% endif %} + {% endcapture %} + {{ page_title | strip }} diff --git a/about.html b/about.html index d12a69c..46eb011 100644 --- a/about.html +++ b/about.html @@ -1,4 +1,5 @@ --- +title: "About" permalink: "/about/" --- diff --git a/community.html b/community.html index 6f0e42c..092122d 100644 --- a/community.html +++ b/community.html @@ -1,4 +1,5 @@ --- +title: "Community" permalink: "/community/" --- diff --git a/download.html b/download.html index 083ace8..d6f6266 100644 --- a/download.html +++ b/download.html @@ -1,4 +1,5 @@ --- +title: "Download" permalink: "/download/" js: - /scripts/download.js diff --git a/games.html b/games.html index 402e4a8..d3e1170 100644 --- a/games.html +++ b/games.html @@ -1,4 +1,5 @@ --- +title: "Server Browser" permalink: "/games/" js: - /scripts/vendor/popper.js diff --git a/legal.html b/legal.html index 4a5c23b..2571eff 100644 --- a/legal.html +++ b/legal.html @@ -1,4 +1,5 @@ --- +title: "Legal" permalink: "/legal/" --- diff --git a/news/index.html b/news/index.html index 9c47359..29e4fd0 100644 --- a/news/index.html +++ b/news/index.html @@ -1,4 +1,5 @@ --- +title: "News Archive" layout: "default" --- diff --git a/players.html b/players.html index 0c8c148..1ff2513 100644 --- a/players.html +++ b/players.html @@ -1,4 +1,5 @@ --- +title: "Player Statistics" permalink: "/players/" js: - /scripts/server-browser.js