Skip to content

Commit

Permalink
Add a new markdown output to the blog
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncanma committed Dec 8, 2024
1 parent 86f3b46 commit a8e7ea6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
9 changes: 8 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ disableSitemap = false
disable404 = false
disableHugoGeneratorInject = false


[outputFormats]
[outputFormats.purchase]
name = "purchase"
Expand All @@ -50,10 +51,16 @@ disableHugoGeneratorInject = false
baseName = "oembed"
mediaType = "application/json"
isPlainText = true
[outputFormats.markdown]
name = "markdown"
baseName = "index"
mediaType = "text/markdown"
isPlainText = true


[outputs]
home = ["HTML", "RSS", "JSON", "OEMBED", "IFRAME"]
page = ["HTML", "OEMBED", "IFRAME"]
page = ["HTML", "OEMBED", "IFRAME", "MARKDOWN"]

[blackfriday]
hrefTargetBlank = false
Expand Down
1 change: 1 addition & 0 deletions themes/hello-friend-ng/layouts/_default/baseof.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ block "main" . }}{{ end }}
3 changes: 3 additions & 0 deletions themes/hello-friend-ng/layouts/_default/single.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# {{ .Title }}

{{ .RawContent }}
3 changes: 3 additions & 0 deletions themes/hello-friend-ng/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
{{ if .OutputFormats.Get "OEMBED" }}
<link href="{{ with .OutputFormats.Get "OEMBED" }}{{ .Permalink }}{{ end }}" rel="alternate" type="application/json+oembed" title="{{ .Title }}" />
{{ end }}
{{ if .OutputFormats.Get "MARKDOWN" }}
<link href="{{ with .OutputFormats.Get "MARKDOWN" }}{{ .Permalink }}{{ end }}" rel="alternate" type="text/markdown" title="{{ .Title }}" />
{{ end }}
{{ if or (eq .Type "tags") (eq .Type "blog")}}<meta name="robots" content="noindex" />{{ end }}
<link rel="canonical" href="{{ .Permalink }}" />
{{ block "title" . }}
Expand Down
3 changes: 3 additions & 0 deletions themes/hello-friend-ng/layouts/posts/single.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# {{ .Title }}

{{ .RawContent }}

0 comments on commit a8e7ea6

Please sign in to comment.