diff options
author | Martin Ashby <martin@ashbysoft.com> | 2022-10-15 22:36:52 +0100 |
---|---|---|
committer | Martin Ashby <martin@ashbysoft.com> | 2022-10-15 22:36:52 +0100 |
commit | 297d38b69efaa54f5585b806e7934375d2df9765 (patch) | |
tree | 76c11158f1d6f2e2f2a8d948b6e6360e75884136 /content | |
download | blogsite2-297d38b69efaa54f5585b806e7934375d2df9765.tar.gz blogsite2-297d38b69efaa54f5585b806e7934375d2df9765.tar.bz2 blogsite2-297d38b69efaa54f5585b806e7934375d2df9765.tar.xz blogsite2-297d38b69efaa54f5585b806e7934375d2df9765.zip |
Initial commitmain
Diffstat (limited to 'content')
-rw-r--r-- | content/index.html | 15 | ||||
-rw-r--r-- | content/markdown/1-hello-blog.md | 14 |
2 files changed, 29 insertions, 0 deletions
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}} +<!doctype html> +<html> +<head> + {{ include "/include/head.html" }} +</head> +<body> + <article>{{ markdown $markdownFile.Body }}</article> +</body> +</html>
\ 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 |