4

I installed Mkdocs (Python 3.6.5) and edited and built Markdown files.

I tried to open the main index.html file with a browser, but I cannot directly open HTML pages linked to other HTML files.

Using Command Prompt and typing "mkdocs serve", I can open linked pages. I know this is a normal function of Mkdocs without server.

Can I use Mkdocs just on my local computer?

AKX
  • 152,115
  • 15
  • 115
  • 172
masaovl
  • 41
  • 2

2 Answers2

5

According to the doc, you can add use_directory_urls: false in mkdocs.yml and rebuild it.

The default style of use_directory_urls: true creates more user friendly URLs, and is usually what you'll want to use. The alternate style (edit: use_directory_urls: false) can occasionally be useful if you want your documentation to remain properly linked when opening pages directly from the file system, because it creates links that point directly to the target file rather than the target directory.

Yohanes Gultom
  • 3,782
  • 2
  • 25
  • 38
0

According to official documentation you can generate html files with mkdocs build. They will be stored in folder called site. You can open built files without having to run mkdocs serve.

SloCompTech
  • 116
  • 1
  • 7