user15826601
user15826601

Reputation: 69

what is the correct way to add external url in mkdocs

I tried this but didn't work, it still showing the index page, what is the correct way?

nav:
  - Home: index.md
  - 'Document': 'https://www.google.com/'

Upvotes: 3

Views: 3261

Answers (1)

sno2
sno2

Reputation: 4173

It should be automatically inferring that it is an external link, per the documentation:

Any path which is not found in the files is assumed to be an external link.

Have you tried it without the www, adding quotes around the index.md (although I'm not sure why that would work), and/or modifying your indents? Those are the only differences I can notice between yours and the example:

nav:
    - Introduction: 'index.md'
    - 'about.md'
    - 'Issue Tracker': 'https://example.com/'

Upvotes: 3

Related Questions