Skip to content

Commit

Permalink
Refactor docs (go-gitea#23752)
Browse files Browse the repository at this point in the history
This was intended to be a small followup for
go-gitea#23712, but...here we are.

1. Our docs currently use `slug` as the entire URL, which makes
refactoring tricky (see go-gitea#23712).
Instead, this PR attempts to make future refactoring easier by using
slugs as an extension of the section. (Hugo terminology)
- What the above boils down to is this PR attempts to use directory
organization as URL management. e.g. `usage/comparison.en-us.md` ->
`en-us/usage/comparison/`, `usage/packages/overview.en-us.md` ->
`en-us/usage/packages/overview/`
- Technically we could even remove `slug`, as Hugo defaults to using
filename, however at least with this PR it means `slug` only needs to be
the name for the **current file** rather than an entire URL
2. This PR adds appropriate aliases (redirects) for pages, so anything
on the internet that links to our docs should hopefully not break.
3. A minor nit I've had for a while, renaming `seek-help` to `support`.
It's a minor thing, but `seek-help` has a strange connotation to it.
4. The commits are split such that you can review the first which is the
"actual" change, and the second is added redirects so that the first
doesn't break links elsewhere.

---------

Signed-off-by: jolheiser <[email protected]>
  • Loading branch information
jolheiser authored Apr 28, 2023
1 parent 8302201 commit bb25f85
Show file tree
Hide file tree
Showing 155 changed files with 278 additions and 49 deletions.
2 changes: 1 addition & 1 deletion docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ enableEmoji: true

permalinks:
post: /:year/:month/:title/
doc: /:slug/
doc: /:sections[1:]/:slug/
page: /:slug/
default: /:slug/

Expand Down
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions docs/content/doc/administration/adding-legal-pages.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: adding-legal-pages
weight: 110
toc: false
draft: false
aliases:
- /en-us/adding-legal-pages
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/backup-and-restore.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "backup-and-restore"
weight: 11
toc: false
draft: false
aliases:
- /en-us/backup-and-restore
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/backup-and-restore.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "backup-and-restore"
weight: 11
toc: false
draft: false
aliases:
- /zh-cn/backup-and-restore
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/backup-and-restore.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "backup-and-restore"
weight: 11
toc: false
draft: false
aliases:
- /zh-tw/backup-and-restore
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/cmd-embedded.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "cmd-embedded"
weight: 20
toc: false
draft: false
aliases:
- /en-us/cmd-embedded
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/command-line.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "command-line"
weight: 1
toc: false
draft: false
aliases:
- /en-us/command-line
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/config-cheat-sheet.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "config-cheat-sheet"
weight: 30
toc: false
draft: false
aliases:
- /en-us/config-cheat-sheet
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/config-cheat-sheet.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "config-cheat-sheet"
weight: 30
toc: false
draft: false
aliases:
- /zh-cn/config-cheat-sheet
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/customizing-gitea.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "customizing-gitea"
weight: 100
toc: false
draft: false
aliases:
- /en-us/customizing-gitea
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/customizing-gitea.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "customizing-gitea"
weight: 100
toc: false
draft: false
aliases:
- /zh-cn/customizing-gitea
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/email-setup.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "email-setup"
weight: 12
toc: false
draft: false
aliases:
- /en-us/email-setup
menu:
sidebar:
parent: "administration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "environment-variables"
weight: 10
toc: false
draft: false
aliases:
- /en-us/environment-variables
menu:
sidebar:
parent: "administration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "environment-variables"
weight: 10
toc: false
draft: false
aliases:
- /zh-cn/environment-variables
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/external-renderers.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "external-renderers"
weight: 60
toc: false
draft: false
aliases:
- /en-us/external-renderers
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/fail2ban-setup.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "fail2ban-setup"
weight: 16
toc: false
draft: false
aliases:
- /en-us/fail2ban-setup
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/fail2ban-setup.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "fail2ban-setup"
weight: 16
toc: false
draft: false
aliases:
- /zh-cn/fail2ban-setup
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/git-lfs-support.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "git-lfs-setup"
weight: 12
toc: false
draft: false
aliases:
- /en-us/git-lfs-setup
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/https-support.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "https-setup"
weight: 12
toc: false
draft: false
aliases:
- /en-us/https-setup
menu:
sidebar:
parent: "administration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "logging-configuration"
weight: 40
toc: false
draft: false
aliases:
- /en-us/logging-configuration
menu:
sidebar:
parent: "administration"
Expand All @@ -29,7 +31,7 @@ As mentioned below, there is a fully functional log output by default, so it is

## Collecting Logs for Help

To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/support.en-us.md" >}}).

## The `[log]` section

Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/mail-templates.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "mail-templates"
weight: 45
toc: false
draft: false
aliases:
- /en-us/mail-templates
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/repo-indexer.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "repo-indexer"
weight: 45
toc: false
draft: false
aliases:
- /en-us/repo-indexer
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/reverse-proxies.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "reverse-proxies"
weight: 16
toc: false
draft: false
aliases:
- /en-us/reverse-proxies
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/reverse-proxies.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "reverse-proxies"
weight: 16
toc: false
draft: false
aliases:
- /zh-cn/reverse-proxies
menu:
sidebar:
parent: "administration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "search-engines-indexation"
weight: 60
toc: false
draft: false
aliases:
- /en-us/search-engines-indexation
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/signing.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "signing"
weight: 50
toc: false
draft: false
aliases:
- /en-us/signing
menu:
sidebar:
parent: "administration"
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions docs/content/doc/contributing/guidelines-backend.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "guidelines-backend"
weight: 20
toc: false
draft: false
aliases:
- /en-us/guidelines-backend
menu:
sidebar:
parent: "contributing"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/contributing/guidelines-frontend.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "guidelines-frontend"
weight: 20
toc: false
draft: false
aliases:
- /en-us/guidelines-frontend
menu:
sidebar:
parent: "contributing"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/contributing/guidelines-refactoring.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "guidelines-refactoring"
weight: 20
toc: false
draft: false
aliases:
- /en-us/guidelines-refactoring
menu:
sidebar:
parent: "contributing"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/contributing/localization.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "localization"
weight: 10
toc: false
draft: false
aliases:
- /en-us/localization
menu:
sidebar:
parent: "contributing"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/contributing/localization.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "localization"
weight: 20
toc: false
draft: false
aliases:
- /zh-cn/localization
menu:
sidebar:
parent: "contributing"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/contributing/localization.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "localization"
weight: 20
toc: false
draft: false
aliases:
- /zh-tw/localization
menu:
sidebar:
parent: "contributing"
Expand Down
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions docs/content/doc/development/api-usage.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "api-usage"
weight: 40
toc: false
draft: false
aliases:
- /en-us/api-usage
menu:
sidebar:
parent: "development"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/development/api-usage.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "api-usage"
weight: 40
toc: false
draft: false
aliases:
- /zh-cn/api-usage
menu:
sidebar:
parent: "development"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/development/hacking-on-gitea.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "hacking-on-gitea"
weight: 10
toc: false
draft: false
aliases:
- /en-us/hacking-on-gitea
menu:
sidebar:
parent: "development"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/development/hacking-on-gitea.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "hacking-on-gitea"
weight: 10
toc: false
draft: false
aliases:
- /zh-cn/hacking-on-gitea
menu:
sidebar:
parent: "development"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/development/integrations.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "integrations"
weight: 65
toc: false
draft: false
aliases:
- /en-us/integrations
menu:
sidebar:
parent: "development"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/development/integrations.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "integrations"
weight: 65
toc: false
draft: false
aliases:
- /zh-tw/integrations
menu:
sidebar:
parent: "development"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/development/migrations.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "migrations-interfaces"
weight: 55
toc: false
draft: false
aliases:
- /en-us/migrations-interfaces
menu:
sidebar:
parent: "development"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/development/migrations.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "migrations-interfaces"
weight: 55
toc: false
draft: false
aliases:
- /zh-tw/migrations-interfaces
menu:
sidebar:
parent: "development"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/development/oauth2-provider.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "oauth2-provider"
weight: 41
toc: false
draft: false
aliases:
- /en-us/oauth2-provider
menu:
sidebar:
parent: "development"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/development/oauth2-provider.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "oauth2-provider"
weight: 41
toc: false
draft: false
aliases:
- /zh-cn/oauth2-provider
menu:
sidebar:
parent: "development"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/development/oauth2-provider.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "oauth2-provider"
weight: 41
toc: false
draft: false
aliases:
- /zh-tw/oauth2-provider
menu:
sidebar:
parent: "development"
Expand Down
Empty file.
Empty file.
Empty file.
Loading

0 comments on commit bb25f85

Please sign in to comment.