Fix index.html title & ensure OpenGraph display on Index without title

- Also added OpenGraph title fallback
This commit is contained in:
Xevion
2022-04-10 17:18:07 -05:00
parent 41865ffcff
commit a9f70d7864
2 changed files with 3 additions and 4 deletions

View File

@@ -20,11 +20,11 @@ layout: compress
<link as="font" crossorigin href="/assets/fonts/-cmuntt.woff2" rel="preload">
<link as="font" crossorigin href="/assets/fonts/-cmunti.woff2" rel="preload">
<link href="/feed.xml" rel="alternate" type="application/atom+xml">
{% if page.title and page._preview_description or page._preview_image -%}
{% if page._preview_description or page._preview_image and page.title or page.name == "index.html" -%}
<meta content="website" property="og:type">
<meta property="og:url" content="{{ page.url | absolute_url }}">
<meta property="og:title" content="{{ page.title }}">
<meta name="twitter:title" content="{{ page.title }}">
<meta property="og:title" content="{{ page.title | default: "Xevion.dev" }}">
<meta name="twitter:title" content="{{ page.title | default: "Xevion.dev" }}">
{% if page._preview_description -%}
<meta property="og:description" content="{{ page._preview_description }}">
<meta property="twitter:description" content="{{ page._preview_description }}">

View File

@@ -1,7 +1,6 @@
---
layout: posts
tag: home
title: My personal website, project portfolio and blog.
_preview_description: Xevion.dev is my personal website where I keep a portfolio of projects, put posts that interest me, and generally a playground for anything that doesn't fit anywhere else.
_preview_image: /assets/img/index-cover.png
---