From 1ec72dcdfcdc08b47f43494a7c682a9bf122e0f1 Mon Sep 17 00:00:00 2001 From: Aravind Date: Sat, 21 Mar 2026 18:11:49 +0530 Subject: [PATCH] Add dynamic Create Docs Issue link with prefilled page context --- layouts/docs/single.html | 1 + layouts/partials/custom/docs-issue-link.html | 4 ++++ layouts/partials/custom/head-end.html | 1 + 3 files changed, 6 insertions(+) create mode 100644 layouts/partials/custom/docs-issue-link.html diff --git a/layouts/docs/single.html b/layouts/docs/single.html index b253f681c0..a1cef4dcb6 100644 --- a/layouts/docs/single.html +++ b/layouts/docs/single.html @@ -18,6 +18,7 @@ {{ partial "components/feedback.html" . }} {{ partial "components/pager.html" . }} {{ partial "components/comments.html" . }} + {{ partial "custom/docs-issue-link.html" . }} diff --git a/layouts/partials/custom/docs-issue-link.html b/layouts/partials/custom/docs-issue-link.html new file mode 100644 index 0000000000..d484fbee3c --- /dev/null +++ b/layouts/partials/custom/docs-issue-link.html @@ -0,0 +1,4 @@ +{{- $issueTitle := urlquery (printf "Improve: %s" .Title) -}} +{{- $issueBody := urlquery (printf "Page: %s" .Permalink) -}} +{{- $link := printf "https://github.com/medic/cht-docs/issues/new?title=%s&body=%s" $issueTitle $issueBody -}} +Create Docs Issue ↗ \ No newline at end of file diff --git a/layouts/partials/custom/head-end.html b/layouts/partials/custom/head-end.html index 6933ef9435..98cecb9d53 100644 --- a/layouts/partials/custom/head-end.html +++ b/layouts/partials/custom/head-end.html @@ -402,5 +402,6 @@ } else { init(); } + })();