Add post preambles that only show on the post page and not on index pages

This commit is contained in:
Shadowfacts 2021-04-12 22:07:52 -04:00
parent 272a4b1326
commit cacf9defc5
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ export interface PostMetadata extends Metadata {
wordCount?: number;
excerpt?: string;
uuid: string;
preamble?: string;
}
export async function get(path: string): Promise<Page> {

View File

@ -9,6 +9,9 @@ metadata.layout = "default.html.ejs"
</h1>
<%- include("../includes/article-meta.html.ejs", { metadata }) %>
<div class="article-content" itemprop="articleBody">
<% if (metadata.preamble) { %>
<%- metadata.preamble %>
<% } %>
<%- content %>
</div>
<details id="comments-container">