diff --git a/lib/metadata.ts b/lib/metadata.ts index 272ec25..8ae31d2 100644 --- a/lib/metadata.ts +++ b/lib/metadata.ts @@ -23,6 +23,7 @@ export interface PostMetadata extends Metadata { wordCount?: number; excerpt?: string; uuid: string; + preamble?: string; } export async function get(path: string): Promise { diff --git a/site/layouts/article.html.ejs b/site/layouts/article.html.ejs index 018c24b..cc9951e 100644 --- a/site/layouts/article.html.ejs +++ b/site/layouts/article.html.ejs @@ -9,6 +9,9 @@ metadata.layout = "default.html.ejs" <%- include("../includes/article-meta.html.ejs", { metadata }) %>
+ <% if (metadata.preamble) { %> + <%- metadata.preamble %> + <% } %> <%- content %>