From 297d38b69efaa54f5585b806e7934375d2df9765 Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Sat, 15 Oct 2022 22:36:52 +0100 Subject: Initial commit --- content/index.html | 15 +++++++++++++++ content/markdown/1-hello-blog.md | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 content/index.html create mode 100644 content/markdown/1-hello-blog.md (limited to 'content') diff --git a/content/index.html b/content/index.html new file mode 100644 index 0000000..26355a3 --- /dev/null +++ b/content/index.html @@ -0,0 +1,15 @@ +{{$pathParts := splitList "/" .OriginalReq.URL.Path}} +{{$markdownFilename := default "index" (slice $pathParts 2 | join "/")}} +{{$markdownFilePath := printf "/content/markdown/%s.md" $markdownFilename}} +{{if not (fileExists $markdownFilePath)}}{{httpError 404}}{{end}} +{{$markdownFile := (include $markdownFilePath | splitFrontMatter)}} +{{$title := default $markdownFilename $markdownFile.Meta.title}} + + + + {{ include "/include/head.html" }} + + +
{{ markdown $markdownFile.Body }}
+ + \ No newline at end of file diff --git a/content/markdown/1-hello-blog.md b/content/markdown/1-hello-blog.md new file mode 100644 index 0000000..4cf5986 --- /dev/null +++ b/content/markdown/1-hello-blog.md @@ -0,0 +1,14 @@ +--- +title: Hello New Blog +--- +Hi, here's a new *markdown* _formatted_ + +## blog post! + +Here's a table: + +|-----------------| +| foo | bar | baz | +|-----|-----|-----| +| val | smt | 123 | +|-----------------| \ No newline at end of file -- cgit v1.2.3-ZIG