forked from shadowfacts/shadowfacts.net
Add post preambles that only show on the post page and not on index pages
This commit is contained in:
parent
272a4b1326
commit
cacf9defc5
|
@ -23,6 +23,7 @@ export interface PostMetadata extends Metadata {
|
||||||
wordCount?: number;
|
wordCount?: number;
|
||||||
excerpt?: string;
|
excerpt?: string;
|
||||||
uuid: string;
|
uuid: string;
|
||||||
|
preamble?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function get(path: string): Promise<Page> {
|
export async function get(path: string): Promise<Page> {
|
||||||
|
|
|
@ -9,6 +9,9 @@ metadata.layout = "default.html.ejs"
|
||||||
</h1>
|
</h1>
|
||||||
<%- include("../includes/article-meta.html.ejs", { metadata }) %>
|
<%- include("../includes/article-meta.html.ejs", { metadata }) %>
|
||||||
<div class="article-content" itemprop="articleBody">
|
<div class="article-content" itemprop="articleBody">
|
||||||
|
<% if (metadata.preamble) { %>
|
||||||
|
<%- metadata.preamble %>
|
||||||
|
<% } %>
|
||||||
<%- content %>
|
<%- content %>
|
||||||
</div>
|
</div>
|
||||||
<details id="comments-container">
|
<details id="comments-container">
|
||||||
|
|
Loading…
Reference in New Issue