nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.62k stars 1.47k forks source link

Fix broken links in docs #16337

Open elliotwaite opened 3 years ago

elliotwaite commented 3 years ago

I recently wrote a script to find all the broken links in the docs: https://github.com/elliotwaite/nim-broken-link-finder

And I create a PR to update most of the ones I found: https://github.com/nim-lang/Nim/pull/16336

However, there were some that I didn't know how to fix, so I'll explain them here.


These pages list imports that lead to 404 pages:


These modules have broken links, but I couldn't find them in the repo to edit them. Do they still exist?

filepermissions broken links:

btreetables broken links:


These next ones are related to identifiers that are listed twice on the same page (e.g. Document and document).

For example, the dom module has this link target:

But when you click on the actual identifier link (the "document" link), it tries to navigate to a version of the URL without the "_2" suffix, which is a dead link:

The same thing happens for these other identifiers:

And that last one for JsonError also messes up the JsonError link near the bottom of the json module page in its Exports section.


The "mget proc" link listed here is broken, but I wasn't sure where it was supposed to link to.


The exitprocs page has two strange listings in the left menu that have a ")" and a ")_2" at the end of them:

In my PR, I fixed a link that points to one of them (the second change here), but maybe it should be changed back if those are being generated incorrectly.


On the random module's page, the two links in the left menu for the rand procs that take an HSlice parameter are broken:


Also, the index and the compiler index have a lot of broken links.

For example, the link under Ascending, for SortOrder.Ascending, points to:

But it should actually point to:

I made some Gists that list all the broken links for each:

timotheecour commented 3 years ago

The correct fix is to implement https://github.com/nim-lang/RFCs/issues/125 with obvious benefits: