Skip to content

How did you get the "Source" and "Edit this page" icon and links to work ? #1357

Answered by facelessuser
akharrou asked this question in Q&A
Discussion options

You must be logged in to vote

All I do is add this before my first title header:

[:octicons-file-code-24:][_critic]{: .source-link }

# Title

I'm using the attr_list extension to assign .souce-link class to the link. I'm also using the pymdownx.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…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@akharrou
Comment options

@facelessuser
Comment options

@facelessuser
Comment options

@akharrou
Comment options

@facelessuser
Comment options

Answer selected by facelessuser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
S: triage Issue needs triage.
2 participants
Converted from issue

This discussion was converted from issue #1356 on June 06, 2021 14:16.