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

Docusaurus-ify #26051

Merged
merged 6 commits into from
Jul 26, 2023
Merged

Docusaurus-ify #26051

merged 6 commits into from
Jul 26, 2023

Conversation

jolheiser
Copy link
Member

@jolheiser jolheiser commented Jul 22, 2023

This PR cleans up the docs in a way to make them simpler to ingest by our docs repo.

  1. It includes all of the sed invocations our ingestion did, removing the need to do it at build time.
  2. It replaces the shortcode variable replacement method with @variable@ style, simply for easier sed invocations when required.
  3. It removes unused files and moves the docs up a level as cleanup.

Sorry if I rebase a few times in these PRs, it tends to be easier to deal with conflicts since there's a lot of file moving as well.

@jolheiser jolheiser added the type/docs This PR mainly updates/creates documentation label Jul 22, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 22, 2023
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 22, 2023
This was referenced Jul 22, 2023
@delvh
Copy link
Member

delvh commented Jul 22, 2023

Why WIP?

@delvh delvh added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Jul 22, 2023
docs/content/usage/packages/cargo.zh-cn.md Outdated Show resolved Hide resolved
@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 Jul 22, 2023
@jolheiser
Copy link
Member Author

Another thing to note, we no longer have an "offline build" of docs with this current PR, as there's no hugo anymore.

Does it make sense to add docusaurus scaffolding in this PR, a follow-up, or not at all?

@delvh
Copy link
Member

delvh commented Jul 22, 2023

follow-up?

@delvh
Copy link
Member

delvh commented Jul 22, 2023

Still, why is this PR WIP?

@jolheiser
Copy link
Member Author

Still, why is this PR WIP?

Only until I fixed the CI piece and got a little feedback. It is otherwise ready, simply needs coordination among the three PRs because the docs repo PR will fail until they are all merged, and then that one can be merged.

Not so much WIP as it is coordinated.

@jolheiser jolheiser marked this pull request as ready for review July 22, 2023 14:06
@techknowlogick
Copy link
Member

My thoughts on an offline build: I know people have found it helpful in the past so I'm hesitant to do away with it, at least fully, but I'd be resistant to including docusaurus deps into the main repo. Perhaps the offline build could remain in some minimal way of rendering the markdown to HTML?

@jolheiser
Copy link
Member Author

jolheiser commented Jul 22, 2023

Perhaps the offline build could remain in some minimal way of rendering the markdown to HTML?

That could be possible, what I've done in this specific PR is to just tar up the markdown files, so at least they are included.

A followup could be to convert them to HTML maybe? Or would you prefer that happen in this PR?

@techknowlogick
Copy link
Member

A followup could be to convert them to HTML maybe? Or would you prefer that happen in this PR?

probably a followup, as this covers a lot already (thanks btw)

@techknowlogick
Copy link
Member

Is there a matching PR for the docs repo for when this is merged?

@jolheiser
Copy link
Member Author

Is there a matching PR for the docs repo for when this is merged?

Yep, https://gitea.com/gitea/gitea-docusaurus/pulls/51

@lunny
Copy link
Member

lunny commented Jul 23, 2023

We can have a HTML tar or PDF download link on the documentation site.

@@ -879,20 +878,14 @@ release-sources: | $(DIST_DIRS)

.PHONY: release-docs
release-docs: | $(DIST_DIRS) docs
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs/public .
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs .
Copy link
Member

Choose a reason for hiding this comment

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

So this is docs source but not the docs. It's a break change from before.

Copy link
Member

Choose a reason for hiding this comment

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

Why is that breaking?
For whom?
People who self-host our documentation?

Copy link
Member Author

Choose a reason for hiding this comment

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

As I mentioned above, a follow-up could be to add some form of conversion to HTML/PDF or similar.

Copy link
Member

@denyskon denyskon left a comment

Choose a reason for hiding this comment

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

👍

@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 Jul 24, 2023
@jolheiser
Copy link
Member Author

Just as a heads up, I'll resolve conflicts in one pass, but I'd like to wait for #26052 and #26053 to be approved first.
They should ideally all go in a batch along with the companion PR in the docs repo.

Then I can also clean up issues (if any) that come from these changes.

lunny pushed a commit that referenced this pull request Jul 26, 2023
See #26051

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: JonRB <4564448+eeyrjmr@users.noreply.github.com>
lunny pushed a commit that referenced this pull request Jul 26, 2023
See #26051

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
@jolheiser jolheiser added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 26, 2023
@jolheiser jolheiser enabled auto-merge (squash) July 26, 2023 02:27
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 26, 2023
@GiteaBot
Copy link
Contributor

@jolheiser please fix the merge conflicts. 🍵

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
@jolheiser jolheiser added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 26, 2023
@jolheiser jolheiser merged commit bd4c7ce into go-gitea:main Jul 26, 2023
23 checks passed
@GiteaBot GiteaBot added this to the 1.21.0 milestone Jul 26, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 26, 2023
@a1012112796
Copy link
Member

Then, wonder how to view preview when edit document now?

@jolheiser
Copy link
Member Author

Then, wonder how to view preview when edit document now?

This is something I will look in to, but I'd argue that previewing it in Hugo wouldn't be a good measure of how it would end up in docusaurus.

For now any markdown previewer should give a semi-accurate view until we get something better in place. 🙂

zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 26, 2023
* giteaofficial/main: (21 commits)
  Only show newly pushed branches message in the same repository (go-gitea#26148)
  Docusaurus-ify (go-gitea#26051)
  Display deprecated warning in admin panel pages as well as in the log file (go-gitea#26094)
  Remove "misc" scope check from public API endpoints (go-gitea#26134)
  Fix LFS object list style (go-gitea#26133)
  Drop the correct deleted branch table (go-gitea#26028)
  Fix CLI allowing creation of access tokens with existing name (go-gitea#26071)
  Fix incorrect router logger (go-gitea#26137)
  Increase table cell horizontal padding (go-gitea#26140)
  Update xorm version (go-gitea#26128)
  Fix UI for release tag page / wiki page / subscription page (go-gitea#25948)
  added ssh mirror workaround description (go-gitea#26096)
  Improve "gitea doctor" sub-command and fix "help" commands (go-gitea#26072)
  Fix wrong commit status in web ui (go-gitea#26121)
  remove IsWarning in  tmpl (go-gitea#26120)
  Fix minor capitalization error in string (go-gitea#26100)
  Improve commit graph alignment and truncating (go-gitea#26112)
  Fix wrong workflow status when rerun a job in an already finished workflow (go-gitea#26119)
  Allow Organisations to have a E-Mail (go-gitea#25082)
  doc sync authentication.md to zh-cn (go-gitea#26117)
  ...
techknowlogick pushed a commit that referenced this pull request Jul 26, 2023
#26051 I accidentally rebased
locally without my re-addition for these files, so they were missed in
the merge, but only for `main`.

Signed-off-by: jolheiser <john.olheiser@gmail.com>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 24, 2023
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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/docs This PR mainly updates/creates documentation type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants