Compare commits

...

2 Commits

Author SHA1 Message Date
9b851ce0e4
Add "View raw" button to page to view raw markdown code of page 2024-10-01 13:29:14 -05:00
f34cffb849
Make markdown output "ugly"
This makes it so, for example, `/blog/swapfile-guide` has markdown file
at `/blog/swapfile-guide.md` instead of `/blog/swapfile-guide/index.md`.
2024-10-01 13:28:19 -05:00
5 changed files with 24 additions and 0 deletions

View File

@ -18,6 +18,9 @@ markup: # this just keeps the bobatheme markup styling
outputs: outputs:
_merge: deep _merge: deep
outputFormats:
_merge: deep
params: params:
author: author:
name: bbaovanc name: bbaovanc

View File

@ -17,6 +17,10 @@ outputs:
- html - html
- markdown - markdown
outputFormats:
markdown:
ugly: true
privacy: privacy:
googleAnalytics: googleAnalytics:
disable: true disable: true

View File

@ -30,6 +30,9 @@ readingtime:
edit_history: edit_history:
other: "Edit history" other: "Edit history"
view_markdown:
other: "View raw"
# Post count # Post count
no_posts: no_posts:
@ -67,6 +70,9 @@ aria_rss_link:
aria_post_meta_edit_history: aria_post_meta_edit_history:
other: "link to page edit history" other: "link to page edit history"
aria_post_meta_view_markdown:
other: "link to view raw markdown code of page"
aria_post_meta_categories: aria_post_meta_categories:
other: "categories" other: "categories"

View File

@ -0,0 +1,8 @@
{{ with .OutputFormats.Get "markdown" }}
<span class="page-metadata-item post-meta-view-markdown" aria-label="{{ i18n "aria_post_meta_view_markdown" }}">
{{ partial "icon.html" "code" }}
<a href="{{ .Permalink }}" target="_blank">
{{- i18n "view_markdown" -}}
</a>
</span>
{{ end }}

View File

@ -20,7 +20,10 @@
{{ partial "page-metadata/item/authors.html" . }} {{ partial "page-metadata/item/authors.html" . }}
{{ partial "page-metadata/item/readingtime.html" . }} {{ partial "page-metadata/item/readingtime.html" . }}
{{ partial "page-metadata/item/edithistory.html" . }} {{ partial "page-metadata/item/edithistory.html" . }}
{{ partial "page-metadata/item/viewraw.html" . }}
{{ partial "page-metadata/item/categories.html" . }} {{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }} {{ partial "page-metadata/item/tags.html" . }}
</div> </div>
{{ end }} {{ end }}