diff --git a/lib/metadata.ts b/lib/metadata.ts index 8ae31d2..0a46ff3 100644 --- a/lib/metadata.ts +++ b/lib/metadata.ts @@ -15,6 +15,7 @@ export interface Metadata { export interface PostMetadata extends Metadata { title: string; + htmlTitle?: string; slug: string; tags: string[]; tagSlugs: string[]; diff --git a/site/includes/article-listing.html.ejs b/site/includes/article-listing.html.ejs index 5fb615e..49bfebf 100644 --- a/site/includes/article-listing.html.ejs +++ b/site/includes/article-listing.html.ejs @@ -1,7 +1,11 @@

- <%= post.metadata.title %> + <% if (post.metadata.htmlTitle) { %> + <%- post.metadata.htmlTitle %> + <% } else { %> + <%= post.metadata.title %> + <% } %>

<%- include("article-meta.html.ejs", { metadata: post.metadata }) %> @@ -11,4 +15,4 @@ -
\ No newline at end of file + diff --git a/site/layouts/article.html.ejs b/site/layouts/article.html.ejs index cc9951e..c8c4f5d 100644 --- a/site/layouts/article.html.ejs +++ b/site/layouts/article.html.ejs @@ -5,7 +5,11 @@ metadata.layout = "default.html.ejs"

- <%= metadata.title %> + <% if (metadata.htmlTitle) { %> + <%- metadata.htmlTitle %> + <% } else { %> + <%= metadata.title %> + <% } %>

<%- include("../includes/article-meta.html.ejs", { metadata }) %>