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

Improve docs about register/run as a service #27461

Merged
merged 4 commits into from
Oct 9, 2023
Merged

Conversation

lng2020
Copy link
Member

@lng2020 lng2020 commented Oct 5, 2023

As title

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 5, 2023
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 5, 2023
@github-actions github-actions bot added the type/docs This PR mainly updates/creates documentation label Oct 5, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 5, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 5, 2023
@@ -36,7 +38,7 @@ If you use SQLite3, change the `PATH` to include the full path:
PATH = c:/gitea/data/gitea.db
```

# Register as a Windows Service
## Register as a Windows service
Copy link
Member

Choose a reason for hiding this comment

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

Interesting that we have a <h1> and <h2> with the same text…

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Actually the rule is partially enabled. It does allow same heading at different levels (allow_different_nesting). If I forbid that, it finds these:

docs/content/administration/cmd-embedded.en-us.md:104 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Example"]
docs/content/administration/cmd-embedded.zh-cn.md:86 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### 示例"]
docs/content/installation/database-preparation.en-us.md:187 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### PostgreSQL"]
docs/content/installation/database-preparation.zh-cn.md:185 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### PostgreSQL"]
docs/content/installation/database-preparation.zh-cn.md:253 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### MySQL"]

Copy link
Member

Choose a reason for hiding this comment

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

In any case, I think it should be forbidden because the anchors will not work correctly.

Copy link
Member

@silverwind silverwind Oct 5, 2023

Choose a reason for hiding this comment

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

It seems docasaurus can somewhat deal with it:

https://docs.gitea.com/administration/cmd-embedded#example
https://docs.gitea.com/administration/cmd-embedded#example-1

Issue is if the first example is deleted, the link that previously pointed to it will now point to the other example.

Copy link
Member

@silverwind silverwind Oct 7, 2023

Choose a reason for hiding this comment

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

#27500 will fix the cases on main branch. I recommend this PR to adapt.

@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 6, 2023
@lunny lunny enabled auto-merge (squash) October 6, 2023 06:49
@lunny lunny disabled auto-merge October 6, 2023 06:50
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 6, 2023
@silverwind silverwind self-requested a review October 7, 2023 11:43
@silverwind
Copy link
Member

Duplicate MD header should be removed, #27500 will enforce this.

@lng2020
Copy link
Member Author

lng2020 commented Oct 7, 2023

Duplicate MD header should be removed, #27500 will enforce this.

OK. Will remove duplicate headers and wait for that PR.

silverwind added a commit that referenced this pull request Oct 7, 2023
Duplicate headers in a single Markdown document are problemlematic
because the auto-generated links won't be stable. Enable this rule with
no exceptions which is also the default of `markdownlint`. For example:

```md
# A
## Example
# B
## Example
```
Docasaurus will generated `example` and `example-1` links for this. If
the first heading is altered, the link `example` will unexpectedly move
to the second example heading.

Ref: #27461 (comment)
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Oct 7, 2023
Duplicate headers in a single Markdown document are problemlematic
because the auto-generated links won't be stable. Enable this rule with
no exceptions which is also the default of `markdownlint`. For example:

```md
# A
## Example
# B
## Example
```
Docasaurus will generated `example` and `example-1` links for this. If
the first heading is altered, the link `example` will unexpectedly move
to the second example heading.

Ref: go-gitea#27461 (comment)
silverwind added a commit that referenced this pull request Oct 7, 2023
Backport #27500 by @silverwind

Duplicate headers in a single Markdown document are problemlematic
because the auto-generated links won't be stable. Enable this rule with
no exceptions which is also the default of `markdownlint`. For example:

```md
# A
## Example
# B
## Example
```
Docasaurus will generated `example` and `example-1` links for this. If
the first heading is altered, the link `example` will unexpectedly move
to the second example heading.

Ref: #27461 (comment)

Co-authored-by: silverwind <me@silverwind.io>
@6543 6543 added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 9, 2023
@6543 6543 merged commit 28ead9e into go-gitea:main Oct 9, 2023
24 checks passed
@GiteaBot GiteaBot added this to the 1.22.0 milestone Oct 9, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 9, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Oct 10, 2023
* giteaofficial/main:
  Respect SSH.KeygenPath option when calculating ssh key fingerprints (go-gitea#27536)
  Remove max-width and add hide text overflow (go-gitea#27359)
  Fix `environment-to-ini` inherited key bug (go-gitea#27543)
  Improve docs about register/run as a service (go-gitea#27461)
  api: GetPullRequestCommits: return file list (go-gitea#27483)
  switch to using official AWS step in release nightly (go-gitea#27532)
  Improve file history UI and fix URL escaping bug (go-gitea#27531)
  Improve dropdown's behavior when there is a search input in menu (go-gitea#27526)
  Simplify `contrib/backport` (go-gitea#27520)
  Add docs section for sub-paths with the container registry (go-gitea#27505)
  Document our new labeling strategy (go-gitea#27523)
  [skip ci] Updated translations via Crowdin
  Restore warning commit status (go-gitea#27504)
  Update labeler to match new labeling system (go-gitea#27525)
  Apply to become a maintainer (go-gitea#27522)
  Remove unnecessary desc for openssh key cron task (go-gitea#27515)
  Tweak labeler config (go-gitea#27502)
  Add hover background to wiki list page (go-gitea#27507)
  [FIX] missing ctx in new_form (go-gitea#27514)
@lng2020 lng2020 deleted the improve_docs branch October 11, 2023 09:52
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/docs size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants