Skip to content

Commit 804b626

Browse files
committed
adding current template.md name in the gh issue
1 parent a5f7780 commit 804b626

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

themes/psh-docs/layouts/_default/baseof.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
<!-- GitHub's feedback form -->
110110
<script>
111111
const FEEDBACK_ISSUE_URL = "{{ .Site.Params._404.issues }}";
112+
const CURRENT_TEMPLATE = "{{ printf "%s/src/%s" site.Params.folder .File.Path }}"
112113
</script>
113114
<script src="{{ "js/gh-issue-feedback-form.js" | relURL }}"></script>
114115

themes/psh-docs/static/js/gh-issue-feedback-form.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ ${selection.toString().trim()}
212212
const anchor = getClosestAnchor(selection.anchorNode.parentElement);
213213
const url = window.location.href.split('#')[0] + anchor;
214214

215-
const title = encodeURIComponent("Content feedback: " + url);
215+
const title = encodeURIComponent("Content feedback: " + document.title);
216216
const issueBaseUrl = typeof FEEDBACK_ISSUE_URL !== "undefined" ? FEEDBACK_ISSUE_URL : "https://github.com/platformsh/platformsh-docs/issues/new";
217217
const body = encodeURIComponent(
218218
`### 📝 Selected text
@@ -224,7 +224,11 @@ ${selectedText}
224224
${feedback}
225225
226226
### 🌐 Page
227-
${url}`
227+
${url}
228+
229+
### Template
230+
${CURRENT_TEMPLATE}
231+
`
228232
);
229233

230234
const issueUrl = `${issueBaseUrl}?title=${title}&body=${body}`;

0 commit comments

Comments
 (0)