How did you get the "Source" and "Edit this page" icon and links to work ? #1357
-
I really like how you got the two buttons "Edit this page" and "Source" on your website and I really want to do something like that, and also have a link to a PDF version of the page. I was wondering how you get that effect ? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
All I do is add this before my first title header:
I'm using the Lastly, I style the icon by targetting the class Anyways, that's basically it. I will go ahead and move this question to discussions as this is neither a bug or feature request. |
Beta Was this translation helpful? Give feedback.
All I do is add this before my first title header:
I'm using the
attr_list
extension to assign.souce-link
class to the link. I'm also using thepymdownx.emoji
extension to assign the image. In this case though, I'm accessing the Material theme's icon resources by using this Material addition with the emoji extension.Lastly, I style the icon by targetting the class
source-link
: https://github.com/facelessuser/pymdown-extensions/blob/main/docs/src/scss/_general.scss#L13. The link provided links to the SCSS source that is then compiled to CSS.Anyways, that's basically it.
I will go ahead and move this question to discussions as…