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

Added generated Table of Contents to long documentation pages #13836

Closed
wants to merge 16 commits into from

Conversation

h0lg
Copy link
Contributor

@h0lg h0lg commented Dec 3, 2020

... for easier overview & navigation.

Note that

  • I did not test all the generated links. But even without that, having the TOC should be an improvement in most of these documents.
  • Some TOC are rather short. Feel free to dismiss the change on a per-doc basis if you feel it's unnecessary.
  • I left a link to the VS code plugin that generated them respectively.

@6543 6543 added the type/docs This PR mainly updates/creates documentation label Dec 3, 2020
@@ -31,6 +31,83 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.

**Note:** A full restart is required for Gitea configuration changes to take effect.

## Table of Contents. <!-- omit in toc -->

<!-- Keep this list up to date and the links in it working across rewordings of headings using one of these markdown extensions in your IDE of choice:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have to mention the VSCode plugin everywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was asking myself the same question. Having (potentially a list of) plugins like that everywhere you have a TOC would cause some bloat and repetition. Having it just once (e.g. in a tooling chapter of the contributing docs) would be cleaner. But then I also doubted whether all contributors would actually read and follow those. I for example was not aware of this https://github.com/go-gitea/gitea/tree/master/docs#install

Either way, using Hugo as suggested below renders this question moot.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 3, 2020
@codecov-io
Copy link

Codecov Report

Merging #13836 (3960456) into master (b1cf7f4) will decrease coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13836      +/-   ##
==========================================
- Coverage   42.23%   42.12%   -0.11%     
==========================================
  Files         699      708       +9     
  Lines       76959    77167     +208     
==========================================
+ Hits        32501    32510       +9     
- Misses      39091    39307     +216     
+ Partials     5367     5350      -17     
Impacted Files Coverage Δ
models/avatar.go 35.00% <0.00%> (-17.18%) ⬇️
modules/cache/cache.go 27.16% <0.00%> (-12.35%) ⬇️
modules/indexer/stats/queue.go 64.70% <0.00%> (-11.77%) ⬇️
models/issue_comment.go 43.50% <0.00%> (-9.22%) ⬇️
modules/indexer/stats/db.go 43.47% <0.00%> (-8.70%) ⬇️
modules/notification/ui/ui.go 84.72% <0.00%> (-8.34%) ⬇️
modules/secret/secret.go 66.66% <0.00%> (-7.41%) ⬇️
modules/notification/mail/mail.go 33.33% <0.00%> (-5.75%) ⬇️
routers/user/avatar.go 18.18% <0.00%> (-4.68%) ⬇️
modules/charset/charset.go 68.53% <0.00%> (-4.50%) ⬇️
... and 49 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1cf7f4...3960456. Read the comment docs.

@lafriks
Copy link
Member

lafriks commented Dec 4, 2020

why not just use Hugo built in TOC: https://gohugo.io/content-management/toc/ ?

@6543
Copy link
Member

6543 commented Dec 4, 2020

-> https://gitea.com/gitea/theme/issues/87

@h0lg
Copy link
Contributor Author

h0lg commented Dec 4, 2020

why not just use Hugo built in TOC: https://gohugo.io/content-management/toc/ ?

That's a way better solution! I was not aware of Hugo, this functionality or this even this ReadMe: https://github.com/go-gitea/gitea/tree/master/docs#install

@h0lg
Copy link
Contributor Author

h0lg commented Dec 4, 2020

Disregard this PR - a better alternative has been suggested.

@h0lg h0lg closed this Dec 4, 2020
@6543
Copy link
Member

6543 commented Dec 4, 2020

@h0lg thanks for your effort :)

document imprufements are always welcome :)

6543 added a commit to 6543-forks/gitea that referenced this pull request Dec 7, 2020
techknowlogick added a commit that referenced this pull request Dec 8, 2020
* Redo #13836 with new shortcode
(https://gitea.com/gitea/theme/pulls/90)

* add Api Usage

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@h0lg h0lg deleted the add-toc-to-long-docs branch December 11, 2020 21:45
@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2021
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. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants