-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Centralize documentation #985
Comments
First off, I'm all in with having proper documentation. Thanks for opening this issue!
GitHub wikis are, in fact, git repositories with markdown files. Hence, you can clone either
IMHO, the GitHub wiki frontend provides few advantages for open collaborative development. It is good for two contexts:
I'm afraid that those contexts do not fit with the current status of cobra. We want many different users with various levels of access rights to suggest modifications in parallel. And we want maintainers to be able to easily compare/view multiple branches/versions.
Because of the reasons exposed above, I think that this should not be a temporary measure, but permanent. Sources of the documentation can be located as a subdir of the main repo or as a sibling repo, but anyway, we should ignore the wiki frontend as an editor (for now). Personally, I think that keeping the docs in the same repo is better in this project. Of course, it is possible to create spf13/cobra-wiki as the canonical location of the docs. Then, that repo can be both added as a submodule to spf13/cobra and mirrored to spf13/cobra.wiki. This would be preferred if we wanted to support edition through the wiki frontend, apart from contribution through the regular PR workflow. Nonetheless, as said, I think that this is looking for problems. So, assuming that we agree on gathering all the docs as markdown sources in a subdir of the main repo, we can discuss different approaches to view them:
Unfortunately, hugo is more of a blog site or personal site generator than a documentation site generator: https://discourse.gohugo.io/t/hugo-as-a-documentation-tool/112. This raises some limitations. Of course, hugo is being enhanced, and it could be possible to overcome some of the limitations through curated templates. However, I feel that none of the available themes is there yet: https://themes.gohugo.io/tags/documentation/ . It is also unfortunate that AFAIK Just as a curiosity, in 1138-4EB/elide the wiki is used to edit part of the documentation. Then, in a CI job, the repo of the wiki is cloned, and sources are modified in order to include them in a hugo site. So, this wiki is viewed as 1138-4eb.github.io/elide/wiki/Menu. Note that there is a dropdown menu in each article that links to 'Source', 'Edit', 'History' and 'Comment'. However, it relies on a shell script and regular expressions (https://github.com/1138-4EB/elide/blob/master/site/travis-deploy-pages2master.sh#L7-L42), which is prone to fail.
My first bet would be to try hugo and gohugoio/gohugoioTheme. However, I don't know if gohugoioTheme is expected to be used by any project other than hugo. @bep?
The documentation can be added to a subdir named
Related issues/discussions: |
There are improvements to be made in documentation. But I think it is a better idea to keep the docs co-located with the code as it is today. |
@jharshman, I think that this issue should be kept open to track improvements to centralize the documentation; even if sources are to be located in the same repo. |
As the Wiki feature is enabled on this repo, I suggest that we move the docs to a central location.
Where
Ideally this could be the Wiki. We could copy over all of the
.md
files into there with minimal effort. As a temporary measure, we can keep both the.md
files in-repo, and just mirror them in the Wiki as separate pages, with the end goal of removing from the repo entirely.If the Wiki is deemed as an improper place to put this documentation, I then suggest something like a
/docs
folder. This is seemingly common in several other Go projects, and would allow the documentation to still be kept locally after cloning the repo. The only downside for this is that there currently exists a/doc
folder, which could be confusing to some.Why
This would have the benefit of allowing a place for more in-depth tutorials for people looking to adapt
cobra
for their own use cases. This could also contain a sort of FAQ for common issues.As an additional benefit, this could potentially provide a single place to address the concerns @umarcor outlined in issue #959.
The main reason I'm asking for something like this is that there seem to be a couple open issues about documentation that are unresolved. I am planning to contribute fixes to those issues, I'm just unsure of where to place said docs. I personally think the Wiki could be a good place for me to start, unless there is some other method that is preferred.
The text was updated successfully, but these errors were encountered: