Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for GitHub relative link in Markdown file

Current License: CC BY-SA 4.0

30 events
when toggle format what by license comment
Oct 13 at 16:27 comment added Edward Falk Sadly, doesn't work for .txt files, even though explicit urls do work.
Nov 21, 2024 at 23:54 comment added wisbucky Too bad Github doesn't support the <README.md> syntax for relative links, like it does for absolute URLs <https://example.com> . That would eliminate the redundancy when you just want to display the URL as the text.
Aug 30, 2021 at 13:26 comment added VonC @Marcono1234 Thank you for this useful feedback. I have included your comment in the answer for more visibility.
Aug 30, 2021 at 13:26 history edited VonC CC BY-SA 4.0
include comment
Aug 30, 2021 at 13:15 comment added Marcono1234 Also useful: When the link starts with a /, it is relative to the root of the repository (regardless of whether the markdown file is nested in subdirectories).
Mar 31, 2021 at 4:46 comment added VonC @LazarĐorđević Good point, thank you. I have updated the answer accordingly.
Mar 31, 2021 at 4:46 history edited VonC CC BY-SA 4.0
add space
Mar 30, 2021 at 23:15 comment added Lazar Đorđević It is easy to forget %20 when ' ' is in link(answer of InvisibleWolf). I think that you should add this in your examples because answer where this is mentioned is far from top.
Mar 12, 2021 at 12:24 comment added VonC @stop-cran OK, that looks better indeed.
Mar 12, 2021 at 12:02 comment added stop-cran @VonC Please disregard my comment - I tried once again and it works as expected: # Overview [![Actions Status](../../workflows/some-workflow/badge.svg)](../../actions) shows both the badge and the correct link.
Mar 12, 2021 at 9:58 comment added VonC @stop-cran Strange, considering stackoverflow.com/a/36313391/6309. Did you try with png image instead of svg?
Mar 12, 2021 at 9:55 comment added stop-cran For images apparently it still does not work. E.g. status badge markdown [![Actions Status](../../workflows/some-workflow/badge.svg)] renders an invalid image link: /user/repo/workflows/some-workflow/badge.svg.
Mar 11, 2016 at 20:05 history edited flogram_dev CC BY-SA 3.0
put code blocks inside quote
Aug 28, 2015 at 0:27 review Suggested edits
Aug 28, 2015 at 1:20
Feb 10, 2014 at 14:23 comment added VonC @NightOwl888 interesting. Time to contact GitHub support then.
Feb 10, 2014 at 14:12 comment added NightOwl888 This works in regular wiki pages, but if you add a _Sidebar.md file there is a difference between how the links resolve on the wiki home page than the rest of the pages. I tried everything here with no luck. The only thing I have come up with so far is to use 2 different _Sidebar.md files and to organize the files into sub-directories.
Feb 1, 2013 at 17:11 vote accept rynop
Jan 31, 2013 at 6:42 history edited VonC CC BY-SA 3.0
include blog post
May 16, 2012 at 23:52 comment added Wayne Bloss Related: For linking from one wiki page to another, [Welcome](./wiki/Hello) works, where Hello is another wiki page in the same repo.
Dec 22, 2011 at 4:57 history edited VonC CC BY-SA 3.0
add reference to markup issue and its current status
Oct 11, 2011 at 19:18 comment added VonC @rynop beside [email protected] (github.com/contact), I don't know. And since I presume you already gone that route, maybe adding an issue to the markdon project itself is the way to go: github.com/github/markup/issues
Oct 11, 2011 at 19:09 comment added rynop github has not replied to my request - anyone know how to officially request a feature?
Oct 5, 2011 at 19:40 comment added VonC @rynop: keep us posted by adding your own answer here ;)
Oct 5, 2011 at 19:38 comment added rynop thanks. I sent an email to support this morning. Hopefully this is the way to send feat requests as I could not find another way :)
Oct 5, 2011 at 18:54 comment added VonC @rynop good example, and good question. Time now to contact GitHub support ;)
Oct 5, 2011 at 18:28 comment added rynop ok so check this. GOTO github.com/rynop/testRel, link does not work. GOTO github.com/rynop/testRel/blob/master/README.md, link works. This is expected cuz at this point starting URL is in the branch. Now how do i get it to pick up the current branch in the README.md at the root of the repo?
Oct 5, 2011 at 18:24 comment added rynop nope. See full example here github.com/rynop/testRel . I could do a relative link specifying the branch, but that defeats the purpose of what I'm trying to do in the first place. If i was linking from a .md in one subdir to another, i think it would handle relative link just fine. Problem occurs when linking from .md in root of repo.
Oct 5, 2011 at 14:13 comment added VonC @rynop but is your relative path already always using the current branch?
Oct 5, 2011 at 13:37 comment added rynop Hmm.. I can make a relative URL (try [link] someDir/README.md, it will make an anchor) - but I want a github branch aware relative link like: myRepo/tree/<$curBranch>/pathToMd.md. I'll probably just open a feature request with github.com
Oct 5, 2011 at 8:39 history answered VonC CC BY-SA 3.0
toggle format

AltStyle によって変換されたページ (->オリジナル) /