From 7368e82cf8a6ac587c1c8f920b3b95a36689b375 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Thu, 9 Oct 2025 01:35:38 -0500 Subject: [PATCH] Remove raw markdown output I don't think it's ever been that useful. It was originally implemented as kind of a test of what Hugo output formats were capable of. It waited for the `ugly` option to get added in `outputFormats` and the novelty of a new Hugo feature was part of the fun of it. As mentioned in 7a65f92f53c3f40c33148bb88b4e1821edebee0f: I believe I originally added it because I thought it was somewhat hard to get from the "View history" commit list to the actual page but I feel like people who care enough to go looking for the source code will be willing to use GitHub to find the actual source file. --- hugo.yaml | 5 ----- i18n/en.yaml | 6 ------ layouts/_partials/page-metadata/item/viewraw.html | 8 -------- layouts/_partials/page-metadata/post-full.html | 1 - layouts/page.markdown.md | 9 --------- 5 files changed, 29 deletions(-) delete mode 100644 layouts/_partials/page-metadata/item/viewraw.html delete mode 100644 layouts/page.markdown.md diff --git a/hugo.yaml b/hugo.yaml index 54ddc67..5f40c77 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -21,11 +21,6 @@ taxonomies: outputs: page: - html - - markdown - -outputFormats: - markdown: - ugly: true privacy: googleAnalytics: diff --git a/i18n/en.yaml b/i18n/en.yaml index 8880d55..6ec28fc 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -32,9 +32,6 @@ readingtime: edit_history: other: "Edit history" -view_markdown: - other: "View raw" - # Post count no_posts: @@ -74,9 +71,6 @@ aria_rss_link: aria_post_meta_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: other: "categories" diff --git a/layouts/_partials/page-metadata/item/viewraw.html b/layouts/_partials/page-metadata/item/viewraw.html deleted file mode 100644 index 4484e05..0000000 --- a/layouts/_partials/page-metadata/item/viewraw.html +++ /dev/null @@ -1,8 +0,0 @@ -{{ with .OutputFormats.Get "markdown" }} - - {{ partial "icon.html" "code" }} - - {{- i18n "view_markdown" -}} - - -{{ end }} diff --git a/layouts/_partials/page-metadata/post-full.html b/layouts/_partials/page-metadata/post-full.html index 5dea827..db7214a 100644 --- a/layouts/_partials/page-metadata/post-full.html +++ b/layouts/_partials/page-metadata/post-full.html @@ -20,7 +20,6 @@ {{ partial "page-metadata/item/authors.html" . }} {{ partial "page-metadata/item/readingtime.html" . }} {{ partial "page-metadata/item/edithistory.html" . }} - {{ partial "page-metadata/item/viewraw.html" . }} {{ partial "page-metadata/item/comments-counter.html" . }} {{ partial "page-metadata/item/categories.html" . }} diff --git a/layouts/page.markdown.md b/layouts/page.markdown.md deleted file mode 100644 index d8f8dd7..0000000 --- a/layouts/page.markdown.md +++ /dev/null @@ -1,9 +0,0 @@ -{{ with .File -}} - {{ with (.Path | readFile) -}} - {{ . -}} - {{ else -}} - {{ errorf "file not found: %s" .Path -}} - {{ end -}} -{{ else -}} - {{ errorf "no file available for markdown template?" -}} -{{ end -}}