Replies: 5 comments 5 replies
-
A temporary solution is to keep separate docs for each minor version, and add deprecation notice for older versions. While TS docs doesn't have versioning built-in, it does have two versions of handbooks, located in different parts of the website: https://github.com/microsoft/TypeScript-Website/tree/v2/packages/documentation/copy/en/handbook-v2 (see the two directories) If they can have 2, we can have 5 ;^) We could simply maintain multiple directories, each for one minor version. It will eventually be a mess (I guess), but I think it is fine as of now as everything is unsettled and we are still developing rapidly, where backward compatibility could break in any nightly. Once that has became a huge issue for us, we will bump major version and only major version docs should be there. Alternatively, we could nest a gatsby theme specifically made for docs with versioning and stuff, such as this. I don't like this idea, because it's too much work and might break a lot of things for something unnecessary as of now. |
Beta Was this translation helpful? Give feedback.
-
I think including the docs (plain markdown) with the lf repo is a good idea. This way versioning becomes trivial, and we can make doc updates part of PRs. Would there be a simple way for generating a viewable website just from the markdown files? Generally, I think one problem is that updating the docs is just way too complicated and everything is hidden somewhere in an odd directory structure. I am not sure if we can simplify things using the current approach. Personally, I would be in favor of using a simpler and more common tool for doc generation, such as mdbook. This also increases the likelihood that new contributors already know how to work with it. However, I don't know how much effort it would be to convert our docs once again...
I can only second this. Personally, I like particularly well the documentation of hydra: https://hydra.cc/docs/intro/, but I don't know which tool they use. There is a dropdown that lets you choose between versions wherever you currently are. The docs for the current development version are also included under the label 'next'. I think it is also important for us to have a live version of the current development version of the docs. This is because we have nightly releases, but also to encourage developers to interact with the docs and keep them up to date. |
Beta Was this translation helpful? Give feedback.
-
Another aspect of versioning is also providing migration guides when there are breaking changes. This is also done pretty well in the hydra docs: https://hydra.cc/docs/upgrades/intro/. |
Beta Was this translation helpful? Give feedback.
-
A word of caution: Yes, the website infrastructure is complex and the markdown files are buried deep in subdirectory. There is a natural tendency, when encountering such complexity, that things can be simplified by redesigning from scratch using the next greatest infrastructure. Months later, we are still discovering and fixing new bugs, still haven't gotten back to the original functionality, and have an architecture that has become at least as complicated as the original. Do we really want to spend all this time rearchitecting the website? Don't we have other higher priorities? Things I like about the current setup:
As for the complexity of the file layout, I run code in the root directory, click on the search button, and start typing the sentence I want to fix. It takes me right to the markdown file, I fix it, and commit. I don't even need to know where the markdown file is. The one potentially serious problem with the website that probably has to be addressed is that GitHub says it has security risks. I'm not sure whether these are in the website itself (I find this unlikely given that it serves static pages) or in the GitHub repo. But someone probably needs to take a look. |
Beta Was this translation helpful? Give feedback.
-
We will have to pay a price either way if we want to integrate versioning in our documentation. If we keep our current infrastructure, we have to implement a solution for versioning, document it, and maintain it. If we switch to a more common tool that already solves the problem, we have to do the initial migration. What I would like to understand is how difficult it is to implement versioning in our current infrastructure (and maintaining that in the long run) and how difficult it would be to migrate to another html generation backend. If we reinvent the wheel, then there should also be a good reason for it. Such a reason could be the drop-down for target language support, which might be challenging to implement with other tools. The points about static html and archiving are also true for any other documentation generation tool that I know of. |
Beta Was this translation helpful? Give feedback.
-
As things change, we have a challenge to keep the documentation up-to-date. At the same time, users who are slower to adopt new versions may want to check out the docs of older versions.
These to things combined suggest to me that it might be better to keep the core docs (i.e., the handbook) closer tied to tags in this repo. One way to do that is to literally move the markdown for the handbook into this repo under a
docs
folder. We could then use something like the mechanism described here to let users chose what version of the docs they want to peruse on the website.I'm not at all sure how difficult this would be to pull off, or whether there are obvious drawbacks to the approach I outlined, or whether there are better ways to approach this, but I'm curious to hear what others think.
Another approach that I can think of is that we dedicate special branches of the website repo to particular versions of the docs (and name them after the release they are documenting)...
Beta Was this translation helpful? Give feedback.
All reactions