[default theme] Add the ability to pass a custom css file & add custom links

This commit is contained in:
Your Name 2024-06-08 22:17:52 +02:00
parent b6608e04b1
commit 27072a80b7
2 changed files with 12 additions and 3 deletions

View file

@ -4,4 +4,5 @@ export interface Branding {
export default interface Config {
branding: Branding;
theme: string;
themeOpts: any;
}

View file

@ -1,9 +1,17 @@
<title><%= config.branding.title %></title>
<link rel="stylesheet" href="/static/custom.css">
<div id="header-content">
<h1><%= config.branding.title %></h1>
<hr>
<div id="link-container">
<a href="/">home</a>
<a href="/post/about.md">about</a>
<a href="/post/contact.md">contact</a>
<% if(config.themeOpts.links) { %>
<% for(const link of config.themeOpts.links) { %>
<a href="<%= link.url %>"><%= link.title %></a>
<% } %>
<% } else { %>
<a href="/">home</a>
<a href="/post/about.md">about</a>
<a href="/post/contact.md">contact</a>
<% } %>
</div>
</div>