Skip to content

Commit 1ec72dc

Browse files
committed
Add dynamic Create Docs Issue link with prefilled page context
1 parent fa41e8e commit 1ec72dc

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

layouts/docs/single.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
{{ partial "components/feedback.html" . }}
1919
{{ partial "components/pager.html" . }}
2020
{{ partial "components/comments.html" . }}
21+
{{ partial "custom/docs-issue-link.html" . }}
2122
</main>
2223
</article>
2324
</div>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{- $issueTitle := urlquery (printf "Improve: %s" .Title) -}}
2+
{{- $issueBody := urlquery (printf "Page: %s" .Permalink) -}}
3+
{{- $link := printf "https://github.com/medic/cht-docs/issues/new?title=%s&body=%s" $issueTitle $issueBody -}}
4+
<a href="{{ $link }}" target="_blank" rel="noreferrer">Create Docs Issue ↗</a>

layouts/partials/custom/head-end.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,5 +402,6 @@
402402
} else {
403403
init();
404404
}
405+
405406
})();
406407
</script>

0 commit comments

Comments
 (0)