From 2ca8d0bde4d6c31454ae8e88e6237412b28becce Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sat, 21 Oct 2023 21:46:52 -0500 Subject: [PATCH] WIP create markdown output template --- exampleSite/hugo.yaml | 5 +++++ layouts/_default/single.markdown.md | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 layouts/_default/single.markdown.md diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index 61047a9..1053812 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -16,6 +16,11 @@ author: markup: # this just keeps the bobatheme markup styling _merge: deep +outputs: + page: + - html + - markdown + params: # these are for the OpenGraph/Twitter embeds in Hugo description: Example website for bobatheme diff --git a/layouts/_default/single.markdown.md b/layouts/_default/single.markdown.md new file mode 100644 index 0000000..d8f8dd7 --- /dev/null +++ b/layouts/_default/single.markdown.md @@ -0,0 +1,9 @@ +{{ with .File -}} + {{ with (.Path | readFile) -}} + {{ . -}} + {{ else -}} + {{ errorf "file not found: %s" .Path -}} + {{ end -}} +{{ else -}} + {{ errorf "no file available for markdown template?" -}} +{{ end -}}