M.Bae
M.Bae

Reputation: 1

Inner link after link

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

Upvotes: 0

Views: 233

Answers (2)

M.H. Tajaddini
M.H. Tajaddini

Reputation: 820

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.

Upvotes: 0

matt
matt

Reputation: 534950

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.

Upvotes: 1

Related Questions