From 45c7ea74846431b8a2ad9b921fe8936afc5e9083 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 a4e6d8f..4efb30d 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -13,6 +13,11 @@ taxonomies: markup: # this just keeps the bobatheme markup styling _merge: deep +outputs: + page: + - html + - markdown + params: author: name: bbaovanc 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 -}}