Skip to content
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

Show different config documents for different releases #17879

Closed
wants to merge 2 commits into from

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Dec 2, 2021

Background

Currently the config-cheat-sheet document misleads many users, there are some new setting options only available in 1.16, while many users who are using 1.15 may be confused why these options don't work.

Solution

This PR splits the config-cheat-sheet document into different releases, just as most projects do.

Feel free to edit on this PR directly and push your commits.

Some other fixes:

  • remove minNodeVersion, we always recommend developers to use Node.js LTS
  • redirect: /en-us/config-cheat-sheet/ => /en-us/config-cheat-sheet-dev/

image

@wxiaoguang wxiaoguang added type/docs This PR mainly updates/creates documentation skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Dec 2, 2021
@wxiaoguang wxiaoguang added this to the 1.16.0 milestone Dec 2, 2021
@wxiaoguang wxiaoguang changed the title Show different config manuals for different versions. Show different config documents for different releases. Dec 2, 2021
@wxiaoguang wxiaoguang changed the title Show different config documents for different releases. Show different config documents for different releases Dec 2, 2021
@silverwind
Copy link
Member

I think ideally we'd have a site-wide version switch mechanism so everything is versioned, not only this one page.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 2, 2021
@wxiaoguang
Copy link
Contributor Author

It's good to have a more general version switch mechanism. ps: I think maybe it is not really site-wide, some pages may not be suitable for the version switch mechanism.

If there is a better implementation of the document version mechanism, feel free to use it replace this one.

If we do not have one in recent future, maybe we can merge this one to make Gitea documents more friendly and clear to users, and then design a better mechanism later to replace this one.

@silverwind
Copy link
Member

silverwind commented Dec 2, 2021

I think a build script would need to be added that checks out all the branches and generate different docs versions and this also should be reflected in the URL, e.g. https://docs.gitea.io/en-us/$VERSION/config-cheat-sheet/ where $VERSION is in major.minor format with a latest pointing to the latest version and being the default version loaded.

@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Dec 2, 2021

I have thought about it, but the idea doesn't work now.

  1. It requires a refactoring about the docs build system. Before this discussion, I had no confidence such work can be approved.
  2. Some links in old documents are incorrect, for example, in https://github.com/go-gitea/gitea/blob/release/v1.8/docs/content/doc/advanced/config-cheat-sheet.en-us.md , there is a link https://github.com/go-gitea/gitea/blob/master/custom/conf/app.ini.sample , I can not fix these problems in one PR, using sed to replace is too dirty and hacky.

@silverwind
Copy link
Member

Maybe it's worth migrating docs to https://github.com/facebook/docusaurus, I imagine it has built-in support for stuff like versioning.

@wxiaoguang
Copy link
Contributor Author

Yep, if there is a better choice, we can try.

@lunny
Copy link
Member

lunny commented Dec 3, 2021

https://docs.gitea.io/en-us/$VERSION/config-cheat-sheet/

I think https://docs.gitea.io/e$VERSION/n-us/config-cheat-sheet/ is better. I will try to send a PR to do that.

@wxiaoguang
Copy link
Contributor Author

Any update? Should we drop/close this one or continue on this one?

@lunny
Copy link
Member

lunny commented Dec 28, 2021

Any update? Should we drop/close this one or continue on this one?

I think a multiple version around the whole site is better.

@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Dec 28, 2021

I do not think multiple version around the whole site works now (it works for some documents, but it seems it's hard to work for all)

For example: this PR #18109 fixes a dead domain in document. It's risky, even worse if someone puts malware on it. If we have multiple version around the whole site, I do not think anyone has the interest to update all documents from 1.8 to 1.15 on every branch.

@lunny
Copy link
Member

lunny commented Dec 28, 2021

I do not think multiple version around the whole site works now (it works for some documents, but it seems it's hard to work for all)

For example: this PR #18109 fixes a dead domain in document. It's risky, even worse if someone puts malware on it. If we have multiple version around the whole site, I do not think anyone has the interest to update all documents from 1.8 to 1.15 on every branch.

We should not maintain all the versions. We could maintain recent 3 versions documents. We can add deprecated hint on old versions.

@wxiaoguang
Copy link
Contributor Author

OK, this one can be closed. Hopefully we can make some progress soon, otherwise many users will be misled.

@wxiaoguang wxiaoguang closed this Dec 29, 2021
@wxiaoguang wxiaoguang deleted the fix-doc-config branch March 15, 2022 03:59
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants