-
Notifications
You must be signed in to change notification settings - Fork 9
Description
The documentation website is build from the docs/ directory of CometBFT's repository, which becomes the root directory (/) of the documentation website.
In order to also include the spec/ directory in the documentation website, this directory is copied into the root directory of the documentation website, thus becoming the /spec/ address.
This has introduced a problem with relative links between the content under docs/ and the content under spec/, as there is no match between relative links in the Github repository and in the documentation website.
For example, considering not necessarily valid files:
spec/foo/bar.mdon Github is rendered as/[version]/spec/foo/bar[.html]on the websitedocs/bar/foo.mdon Github is rendered as/[version]/bar/foo[.html]on the website- assume that the above
barpage wants to include a link to the abovefoopage:- if the relative link
../../docs/bar/foo.mdis adopted, it works on GitHub but it is broken in the website, as it will be rendered as/[version]/docs/bar/foo[.html](note the additional/docs/component) - if the relative link
../../bar/foo.mdis adopted, it does not works on GitHub (because thedocs/prefix is missing), but it works on the website
- if the relative link
- the same applies if the above
foofile wants to include a link to the abovebarfile:- if the relative link
../../spec/foo/bar.mdis adopted, it works on GitHub but it is broken in the website, as it will be rendered as/spec/foo/bar[.html](note the missing/[version]/component) - if the relative link
../spec/foo/bar.mdis adopted, it does not works on GitHub (because there is nodocs/spec), but it works on the website
- if the relative link
The current solution for this problem is to adopt full links between parts of the same repository. While this solves the problem of possibly broken links, it introduces the problem of one source of the documentation pointing to the other, namely:
- if a full Github link is adopted, the docs website points to the Github, not to the content hosted by itself
- if a full documentation website link is adopted, the Github points to the website, not to the content there hosted
This issue is probably known by whoever attempted to write or update the documentation website, and there is no necessarily an easy solution for it.
What we could consider is to introduce some mechanism, on the Github repository and/or the documentation website, to render at least one of the combinations of cross-directory links above exemplified operational. An initial list of solutions to consider:
- Create symbolic links on Github, for instance,
spec/docs/pointing todocs/ordocs/specpointing tospec/? - Create similar links on the documentation website, for instance
/[version]/docs/pointing to/[version]/or/[version]/spec/docspointing to/[version]/? - Create some rewriting roles on the documentation website to fix this incongruity?