Skip to content

Commit

Permalink
Finish the sample site by adding custom page titles and descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Travizzle committed Mar 3, 2024
1 parent f00ca92 commit 53b6ae2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<head>
{% if page.title %}
<title>{{ page.title }} | Test Page</title>
<meta property="og:title" content="{{ page.title }} | Test Page">
{% else %}
<title>Test Page: Don't Panic</title>
<meta property="og:title" content="Test Page: Don't Panic">
{% endif %}
{% if page.description %}
<meta name="description" content="{{ page.description }}">
<meta property="og:description" content="{{ page.description }}">
{% else %}
<meta name="description" content="This is a dangerous site.">
<meta property="og:description" content="This is a dangerous site">
{% endif %}
<link href="/favicon.png" rel="icon">
<meta charset="utf-8">
Expand Down
1 change: 1 addition & 0 deletions _posts/2023-11-10-title-of-post.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: post
title: This is the title of the post
description: testing if page.description works
postHero: /images/shark.jpg
author: Me, Myself, and I
authorTwitter: https://twitter.com/mhartl
Expand Down

0 comments on commit 53b6ae2

Please sign in to comment.