0

In markdown, I want to redirect to other file in same folder.
And also, it must go to middle of page.
So I tried:

[TITLE](./filename.md#5.-fifth)

but it redirects to top of page, how can I do this?

In filename.md, ,

# Title
## 1. First subtitle
## 2. ....
...
## 5. fifth <<- i want to go here
M.Bae
  • 1
  • 3

2 Answers2

1

It sounds like you are expecting a ## subhead to be an anchor you can link to. That is not a markdown feature. Some specific markdown implementations, such as GitHub, might do that for you; but it is not part of the markdown standard and you must not expect your markdown to do it.

matt
  • 515,959
  • 87
  • 875
  • 1,141
0

What you're doing is right. It really boils down to your flavor of MarkDown, and where you're using it.

For example, I use VSCode with a couple of extensions for my MD files and it recognized the link flawlessly. So I tried putting the files on GitHub to see how it'd work out. It looks like the dot . in your section name is causing problems. So, I'd suggest trying a different naming/numbering method.

For the sake of completeness, here's also a complete answer.

M.H. Tajaddini
  • 776
  • 4
  • 20