I am generating docs of my module foo using the following command:
nim doc --out:html --project src/foo.nim
It generates html docs in the directory out with out/foo.html as the main html file. When I deploy foo on github pages, nothing shows up there because github pages accept index.html to be the starting point and it can't be found.
Is there a way to change out/foo.html to out/index.html using a command line switch?
Currently, I am manually moving out/foo.html to out/index.html.
Thanks @PMuch. You are right.
I have the following structure.
src/
├── bmo.nim
├── bmopkg/
│ ├── cli.nim
│ ├── command.nim
│ ├── common.nim
│ ├── install.nim
│ └── subcom.nim
└── data/
└── install_choco.ps1
If I move data out of the src, it generates index.hml as main file.
Ah, I see. Thanks for the explanation.
Well, IMHO, it is really not about number of keystrokes but default behaviour. One usually expects index.html to be present in a website by default, and most web-browsers expects index.html to be the starting point (not sure if this is standard). So, it is not all unreasonable to expect nim doc that generates html by default is to generate an index.html file by default. My two cents.
So there are pros and cons of both ugly and pretty URLs. Good thing is that it's pretty easy to convert the Ugly URLs to Pretty URLs using a Nimscript task like this.