Skip to content

Commit d066c13

Browse files
committed
Add markdown output in preparation for llms.txt
1 parent f64d236 commit d066c13

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

config.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ rdi_current_version = "1.8.0"
8383

8484
# Everything below this are Site Params
8585

86+
# Add markdown output
87+
[outputFormats]
88+
[outputFormats.markdown]
89+
name = "markdown"
90+
baseName = "index"
91+
mediaType = "text/markdown"
92+
isPlainText = true
93+
8694
# Comment out if you don't want the "print entire section" link enabled.
8795
[outputs]
88-
section = ["HTML", "RSS"] # print
96+
section = ["HTML", "RSS", "Markdown"] # print
97+
page = ["HTML", "Markdown"]

layouts/_default/section.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# {{ .Title }}
2+
{{ $content := .RawContent }}
3+
{{ $content := $content | replaceRE "\\{\\{< relref \"([^\"]+)\" >\\}\\}" "https://redis.io$1" }}
4+
{{ $content }}

layouts/_default/single.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# {{ .Title }}
2+
{{ $content := .RawContent }}
3+
{{ $content := $content | replaceRE "\\{\\{< relref \"([^\"]+)\" >\\}\\}" "https://redis.io$1" }}
4+
{{ $content }}

0 commit comments

Comments
 (0)