Icon next to edit button #8238
-
Hi guys! I would like to add a custom icon next to the “Edit” button. What is the best way to archive it? How can I customize it? The button should not be static. I would like a button that links directly to a Jira issue creation form, with the title “Docs: ${page on which I was in the docs}” and a description like the link to this page. I hope you understand what I mean |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello @maximilienkohl, As for the extension of the theme, you could modify the
And another way would be to add the button dynamically in JavaScript in your
At GMC we've used a similar approach to add a "add location" button which is added in JavaScript and sends a GET-based request to GitHub. However, we'll opt-out of multi-language approach for GMC, so I don't know how long "the example" will be online. |
Beta Was this translation helpful? Give feedback.
Hello @maximilienkohl,
I don't know how Jira handles the creation of new issues, if it's an URL and plain GET params fill out the fields in the form or if you have to send a POST request with a CDATA payload containing the input fields for the Jira form. I'll leave figuring this out to you 🫡
As for the extension of the theme, you could modify the
actions.html
partial and add another button with a link to the GET-based URL mentioned above. This way the button would be added during MkDocs build, just like the other buttons.