Add html titles for posts
This commit is contained in:
parent
d96af5537f
commit
629e3def20
|
@ -15,6 +15,7 @@ export interface Metadata {
|
|||
|
||||
export interface PostMetadata extends Metadata {
|
||||
title: string;
|
||||
htmlTitle?: string;
|
||||
slug: string;
|
||||
tags: string[];
|
||||
tagSlugs: string[];
|
||||
|
|
|
@ -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">
|
||||
<% if (post.metadata.htmlTitle) { %>
|
||||
<%- post.metadata.htmlTitle %>
|
||||
<% } else { %>
|
||||
<%= post.metadata.title %>
|
||||
<% } %>
|
||||
</a>
|
||||
</h2>
|
||||
<%- include("article-meta.html.ejs", { metadata: post.metadata }) %>
|
||||
|
|
|
@ -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">
|
||||
<% if (metadata.htmlTitle) { %>
|
||||
<%- metadata.htmlTitle %>
|
||||
<% } else { %>
|
||||
<%= metadata.title %>
|
||||
<% } %>
|
||||
</h1>
|
||||
<%- include("../includes/article-meta.html.ejs", { metadata }) %>
|
||||
<div class="article-content" itemprop="articleBody">
|
||||
|
|
Loading…
Reference in New Issue