doco icon indicating copy to clipboard operation
doco copied to clipboard

Doco Serve showing root folder directory instead of actual doco on build.

Open Axodouble opened this issue 1 year ago • 5 comments

Running doco serve seems to only show a preview of the root folder directory instead of what it shows on github pages. 7916e3

Axodouble avatar Feb 04 '24 20:02 Axodouble

  • No errors in log:
2024/02/04 21:35:16 > Serving documentation on http://localhost:3000/
2024/02/04 21:35:16 > 👀 Watching for changes in docs

Axodouble avatar Feb 04 '24 20:02 Axodouble

Thanks, @Axodouble. For reporting this, it happens because there is no index.md in your docs folder; hence, no index.html is generated. This file is generated with doco init. That said, I need to tweak a couple of things after reading this case; thanks for sharing it!

paganotoni avatar Feb 04 '24 23:02 paganotoni

@Axodouble As a fix, you could manually add docs/index.md. That should make doco serve index.html instead of the folder. I will keep you posted regarding any improvement in this behavior. Thanks again.

paganotoni avatar Feb 04 '24 23:02 paganotoni

Looks good, I will update the issue once I get a chance to test this.

Axodouble avatar Feb 05 '24 08:02 Axodouble

There is now an index.md file in the docs folder, however same behavior still persists.

Possibly important information however is that the docs folder is a child in the folder the command is being executed in, when changing the address to http://localhost:3000/docs/ it does work, however manually executing the same command in the docs folder causes the following in the log:

2024/02/05 19:06:07 > Serving documentation on http://localhost:3000/
2024/02/05 19:06:07 > 👀 Watching for changes in docs
2024/02/05 19:06:07 CreateFile docs: The system cannot find the file specified.

Hope this specifies some things.

Axodouble avatar Feb 05 '24 18:02 Axodouble