Skip to content

Expecting [[./a/index]] to return <a href="a/", get <a href="a/index" #53

@ooker777

Description

@ooker777

With this mkdocs.yml:

site_name: test
plugins:
  - ezlinks:
        wikilinks: true

And this folder structure:

docs/ 
├── index.md 
└── a/ 
	└── index.md

After the build we will have:

site/ 
├── index.html
└── a/ 
	└── index.html

If in docs/index.md you have this content:

[[a/index]]
[[a/index.md]]
[[./a/index]]
[[./a/index.md]]

Then in site/index.html the html will be:

| docs/index.md    | site/index.html                                    | Correct? |
| ---------------- | -------------------------------------------------- | -------- |
| [[a/index]]      | <a href="a/" title="a/index">a/index</a>           | ✔        |
| [[a/index.md]]   | <a href="a/" title="a/index.md">a/index.md</a>     | ✔        |
| [[./a/index]]    | <a href="a/index" title="./a/index">./a/index</a>  | ❌       |
| [[./a/index.md]] | <a href="a/" title="./a/index.md">./a/index.md</a> | ✔        |

At the same time Mkdocs will notice this:

INFO    -  Doc file 'index.md' contains an
           unrecognized relative link
           'a/index', it was left as is. Did  
           you mean 'a/index.md'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions