This commit is contained in:
Michael Thomson 2024-09-13 11:01:18 -07:00
parent a42a63faac
commit 471b72c23e
7 changed files with 54 additions and 26 deletions

View File

@ -0,0 +1,15 @@
---
title: First Post
---
This is my first post
Here's some code!
```c
int main()
{
printf("Hello, World!");
return 0;
}
```

View File

@ -2,4 +2,7 @@
title: Michael Thomson
---
Welcome to my site! not much here yet.
## Recent blog posts
- [First Blog Post](/blog/first-post)

2
gen.sh
View File

@ -1,4 +1,4 @@
#!/bin/bash
cd content
find . -type d -exec mkdir -p ../public/{} \;
find ./ -iname "*.md" -type f -exec sh -c 'pandoc "${0}" -f markdown -t html5 --template ../templates/page.html --css index.css -o "../public/$(basename ${0%.md}.html)"' {} \;
find ./ -iname "*.md" -type f -exec sh -c 'pandoc "${0}" -f markdown -t html5 --template ../templates/page.html --css index.css -o "../public/${0%.md}.html"' {} \;

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/hybrid.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<title>First Post</title>
<link rel="stylesheet" href="/index.css" />
</head>
<body>
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/blog">Blog</a>
<a href="/contact">Contact</a>
</nav>
<h1 class="title">First Post</h1>
<p>This is my first post</p>
<p>Heres some code!</p>
<div class="sourceCode" id="cb1"><pre
class="sourceCode c"><code class="sourceCode c"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main<span class="op">()</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">&quot;Hello, World!&quot;</span><span class="op">);</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">0</span><span class="op">;</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
</body>
</html>

View File

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/hybrid.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<title>first-post</title>
<link rel="stylesheet" href="index.css" />
</head>
<body>
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/blog">Blog</a>
<a href="/contact">Contact</a>
</nav>
</body>
</html>

View File

@ -6,7 +6,7 @@
<script>hljs.highlightAll();</script>
<title>Michael Thomson</title>
<link rel="stylesheet" href="index.css" />
<link rel="stylesheet" href="/index.css" />
</head>
<body>
<nav>
@ -16,6 +16,10 @@
<a href="/contact">Contact</a>
</nav>
<h1 class="title">Michael Thomson</h1>
<p>Welcome to my site! not much here yet.</p>
<h2 id="recent-blog-posts">Recent blog posts</h2>
<ul>
<li><a href="/blog/first-post">First Blog Post</a></li>
</ul>
</body>
</html>

View File

@ -12,9 +12,7 @@ $if(date-meta)$
<meta name="dcterms.date" content="$date-meta$" />
$endif$
<title>$pagetitle$</title>
$for(css)$
<link rel="stylesheet" href="$css$" />
$endfor$
<link rel="stylesheet" href="/index.css" />
</head>
<body>
<nav>