Add html titles for posts

This commit is contained in:
Shadowfacts 2022-01-20 12:46:17 -05:00
parent d96af5537f
commit 629e3def20
3 changed files with 12 additions and 3 deletions

View File

@ -15,6 +15,7 @@ export interface Metadata {
export interface PostMetadata extends Metadata {
title: string;
htmlTitle?: string;
slug: string;
tags: string[];
tagSlugs: string[];

View File

@ -1,7 +1,11 @@
<article itemscope itemtype="https://schema.org/BlogPosting">
<h2 class="article-title" itemprop="headline">
<a href="<%= post.metadata.permalink %>" itemprop="url mainEntityOfPage">
<%= post.metadata.title %>
<% if (post.metadata.htmlTitle) { %>
<%- post.metadata.htmlTitle %>
<% } else { %>
<%= post.metadata.title %>
<% } %>
</a>
</h2>
<%- include("article-meta.html.ejs", { metadata: post.metadata }) %>
@ -11,4 +15,4 @@
<p class="read-more-link">
<a href="<%= post.metadata.permalink%>">Read more...</a>
</p>
</article>
</article>

View File

@ -5,7 +5,11 @@ metadata.layout = "default.html.ejs"
<article itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<meta itemprop="mainEntityOfPage" content="https://shadowfacts.net<%= metadata.permalink %>">
<h1 class="article-title" itemprop="name headline">
<%= metadata.title %>
<% if (metadata.htmlTitle) { %>
<%- metadata.htmlTitle %>
<% } else { %>
<%= metadata.title %>
<% } %>
</h1>
<%- include("../includes/article-meta.html.ejs", { metadata }) %>
<div class="article-content" itemprop="articleBody">