GitHub Pages autolinks fail #22154
-
Hi, I’m attempting to use autolinks on my Pages website; it’s not working for me. Viewed via my github.io address, bare URL’s fail to automatically turn into links. But, when my Pages Markdown documents are viewed via browsing an appropriate repository through github.com, then the links show up. Am I missing something or is there a bug here (or is autolinking not supported for Pages webpages)? To be clear, by “autolinking”, I mean I am not using brackets or parentheses or any explicit Markdown notation. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi, Brian, welcome to the GitHub Support Community! Could you give us some more information about exactly what you mean? A link to the repository you’re working with, or some example source code, would be very helpful! |
Beta Was this translation helpful? Give feedback.
-
Hi Thomas, Two links that show this are: A blog entry that I have from August 29th, 2020 shows clickable automatically-generated links via the second address, but not via the first address. I’d like to add links without using Thanks, |
Beta Was this translation helpful? Give feedback.
-
Thanks for dropping those links! By default GitHub Pages uses Kramdown as the markdown processor for sites, whereas GitHub.com uses a variant of CommonMark—GitHub Flavoured Markdown. This is what’s causing your autolinks to work inside your repository but not on your Pages site. To change this you’ll need to create a
Once you’ve done that, and your site has had time to rebuild, any links you’ve got in there should be clickable just like inside your repository! |
Beta Was this translation helpful? Give feedback.
-
Hi Thomas, Thanks for your help. Brian |
Beta Was this translation helpful? Give feedback.
-
One thing to note is that you must include the |
Beta Was this translation helpful? Give feedback.
Thanks for dropping those links!
By default GitHub Pages uses Kramdown as the markdown processor for sites, whereas GitHub.com uses a variant of CommonMark—GitHub Flavoured Markdown. This is what’s causing your autolinks to work inside your repository but not on your Pages site.
To change this you’ll need to create a
_config.yml
file inside your repository with the following content to set your markdown renderer to GFM:https://docs.github.com/en/github/working-with-github-pages/setting-a-markdown-processor-for-your-github-pages-site-using-jekyll
Once you’ve done that, and your site has had time to rebuild, any links you’ve got in there should be clickable just like inside …