diff --git a/i18n/en.yaml b/i18n/en.yaml index b6dff1d..41890c4 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -30,6 +30,9 @@ readingtime: edit_history: other: "Edit history" +view_markdown: + other: "View raw" + # Post count no_posts: @@ -67,6 +70,9 @@ 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 new file mode 100644 index 0000000..4484e05 --- /dev/null +++ b/layouts/partials/page-metadata/item/viewraw.html @@ -0,0 +1,8 @@ +{{ 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 93225bb..bd13f4d 100644 --- a/layouts/partials/page-metadata/post-full.html +++ b/layouts/partials/page-metadata/post-full.html @@ -20,7 +20,10 @@ {{ 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/categories.html" . }} + {{ partial "page-metadata/item/tags.html" . }} {{ end }}