aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.json2
-rw-r--r--config.toml2
-rw-r--r--config.yaml2
-rw-r--r--content/canory/messages/markdown.md10
-rw-r--r--content/canory/messages/selfdestruct.md6
-rw-r--r--themes/default/layouts/partials/function-paths-markdown.html1
-rw-r--r--themes/default/layouts/partials/meta-source.html4
-rw-r--r--themes/default/layouts/shortcodes/markdown.html14
8 files changed, 28 insertions, 13 deletions
diff --git a/config.json b/config.json
index 57bbc29..2d23181 100644
--- a/config.json
+++ b/config.json
@@ -309,7 +309,7 @@
},
{
"source": "content",
- "target": "static/raw"
+ "target": "static/data/generates/content"
},
{
"source": "themes/default/layouts",
diff --git a/config.toml b/config.toml
index 92d171c..7f78cf4 100644
--- a/config.toml
+++ b/config.toml
@@ -233,7 +233,7 @@ enableRobotsTXT = true
[[module.mounts]]
source = "content"
- target = "static/raw"
+ target = "static/data/generates/content"
[[module.mounts]]
source = "themes/default/layouts"
diff --git a/config.yaml b/config.yaml
index c7e60dd..0e3f7ca 100644
--- a/config.yaml
+++ b/config.yaml
@@ -210,7 +210,7 @@ module:
target: archetypes
- source: content
- target: static/raw
+ target: static/data/generates/content
- source: themes/default/layouts
target: static/sources/files
- source: data
diff --git a/content/canory/messages/markdown.md b/content/canory/messages/markdown.md
index 2fbffb0..032f5e5 100644
--- a/content/canory/messages/markdown.md
+++ b/content/canory/messages/markdown.md
@@ -7,9 +7,9 @@ author = "canory"
[//]: # "That's a comment alright, hiding in plain sight."
-The `metadata` :arrow_up: has a [`raw`](/raw/canory/messages/markdown.md) link
-to the [`markdown`](https://www.markdownguide.org/cheat-sheet/) that generates
-this message --- might as well show my internals. Casual users will frown, power users
-will delight.
+The `metadata` :arrow_up: has a link to the raw
+[Markdown](https://www.markdownguide.org/cheat-sheet/) file {{< markdown >}}
+that generates this message --- might as well show my internals. Casual users
+will frown, power users will delight.
-{{< self "/raw/canory/messages/markdown.md" >}}
+{{< markdown embed=true >}}
diff --git a/content/canory/messages/selfdestruct.md b/content/canory/messages/selfdestruct.md
index a793638..c4bb726 100644
--- a/content/canory/messages/selfdestruct.md
+++ b/content/canory/messages/selfdestruct.md
@@ -22,9 +22,7 @@ controversy. This is not to be indexed --- search engine bots
{{< smallcaps "shall not pass" >}} (hopefully), neither will this message propogate through
`JSON` and `RSS` feeds.
-This
-[hidden message](/raw/canory/messages/selfdestruct.md "hidden in plain sight")
-will only disappear in my timeline because I'm an intergalactic time traveler.
-
+This {{< markdown title="hidden in plain sight" >}} will only disappear in my
+timeline because I'm an intergalactic time traveler.
![Isaac Asimov](/canory/media/internet-is-serious.jpg)
diff --git a/themes/default/layouts/partials/function-paths-markdown.html b/themes/default/layouts/partials/function-paths-markdown.html
new file mode 100644
index 0000000..ab92b8d
--- /dev/null
+++ b/themes/default/layouts/partials/function-paths-markdown.html
@@ -0,0 +1 @@
+{{ return "data/generates/content" }}
diff --git a/themes/default/layouts/partials/meta-source.html b/themes/default/layouts/partials/meta-source.html
index c314cdd..a172726 100644
--- a/themes/default/layouts/partials/meta-source.html
+++ b/themes/default/layouts/partials/meta-source.html
@@ -5,7 +5,9 @@
{{- with .Params.feed.raw -}}
<a title="{{ $.Site.BaseURL }}/{{ . }}" href="{{ $.Site.BaseURL }}/{{ . }}">
{{- else -}}
-<a title="{{ .Site.BaseURL }}/raw/{{ $source }}" href="{{ .Site.BaseURL }}/raw/{{ $source }}">
+<a
+ href="{{ .Site.BaseURL }}/{{ partial "function-paths-markdown.html" }}/{{ $source }}"
+ title="{{ .Site.BaseURL }}/{{ partial "function-paths-markdown.html" }}/{{ $source }}">
{{- end -}}
raw
</a>
diff --git a/themes/default/layouts/shortcodes/markdown.html b/themes/default/layouts/shortcodes/markdown.html
new file mode 100644
index 0000000..c40c0b9
--- /dev/null
+++ b/themes/default/layouts/shortcodes/markdown.html
@@ -0,0 +1,14 @@
+{{- $link := default (print "/" (partial "function-paths-markdown.html") "/" .Page.File ) (.Get "link" | default (.Get 0)) -}}
+{{- $name := default (path.Base .Page.File) (.Get "name" | default (.Get 1)) -}}
+{{- $title := default "Markdown Embed" (.Get "title" | default (.Get 2)) -}}
+{{- $embed := default false (.Get "embed" | default (.Get 3)) -}}
+
+{{- if $embed -}}
+ {{ print
+ "{{< self "
+ "url=" "\"" $link "\"" " "
+ "title=" "\"" $title "\"" " "
+ ">}}" | markdownify }}
+{{- else -}}
+ {{- print "[" $name "]" "(" $link " " "\"" $link "\"" ")" | markdownify -}}
+{{- end -}}