Skip to content

Commit bd4c7ce

Browse files
authored
Docusaurus-ify (#26051)
This PR cleans up the docs in a way to make them simpler to ingest by our [docs repo](https://gitea.com/gitea/gitea-docusaurus). 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. --------- Signed-off-by: jolheiser <[email protected]>
1 parent 5dc37ef commit bd4c7ce

File tree

281 files changed

+794
-2157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+794
-2157
lines changed

.github/workflows/pull-compliance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
node-version: 20
155155
- run: make deps-frontend
156156
- run: make lint-md
157-
- run: make docs # test if build could succeed
157+
- run: make docs
158158

159159
actions:
160160
if: needs.files-changed.outputs.actions == 'true' || needs.files-changed.outputs.actions == 'true'

Makefile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ help:
197197
@echo " - clean delete backend and integration files"
198198
@echo " - clean-all delete backend, frontend and integration files"
199199
@echo " - deps install dependencies"
200-
@echo " - deps-docs install docs dependencies"
201200
@echo " - deps-frontend install frontend dependencies"
202201
@echo " - deps-backend install backend dependencies"
203202
@echo " - deps-tools install tool dependencies"
@@ -373,11 +372,11 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
373372

374373
.PHONY: lint-js
375374
lint-js: node_modules
376-
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e
375+
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js tests/e2e
377376

378377
.PHONY: lint-js-fix
379378
lint-js-fix: node_modules
380-
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e --fix
379+
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js tests/e2e --fix
381380

382381
.PHONY: lint-css
383382
lint-css: node_modules
@@ -879,20 +878,14 @@ release-sources: | $(DIST_DIRS)
879878

880879
.PHONY: release-docs
881880
release-docs: | $(DIST_DIRS) docs
882-
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs/public .
881+
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs .
883882

884883
.PHONY: docs
885-
docs: deps-docs
886-
cd docs; make trans-copy clean build-offline;
887-
888-
.PHONY: deps-docs
889-
deps-docs:
890-
@hash hugo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
891-
curl -sL https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_$(HUGO_VERSION)_Linux-64bit.tar.gz | tar zxf - -C /tmp && mkdir -p ~/go/bin && mv /tmp/hugo ~/go/bin/hugo && chmod +x ~/go/bin/hugo; \
892-
fi
884+
docs:
885+
cd docs; bash scripts/trans-copy.sh;
893886

894887
.PHONY: deps
895-
deps: deps-frontend deps-backend deps-tools deps-docs deps-py
888+
deps: deps-frontend deps-backend deps-tools deps-py
896889

897890
.PHONY: deps-py
898891
deps-py: .venv

docs/Makefile

Lines changed: 0 additions & 36 deletions
This file was deleted.

docs/README.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,7 @@
33
[![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/Gitea)
44
[![](https://images.microbadger.com/badges/image/gitea/docs.svg)](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
55

6-
## Hosting
7-
8-
These pages are hosted using [netlifycms](https://www.netlifycms.org/) and get
9-
automatically updated on every push to the `master` branch.
10-
11-
## Install
12-
13-
These pages use the [Hugo](https://gohugo.io/) static site generator.
14-
If you are planning to contribute you'll want to download and install Hugo on
15-
your local machine.
16-
17-
The installation of Hugo is out of the scope of this document, so please take
18-
the [official install instructions](https://gohugo.io/installation/) to
19-
get Hugo up and running.
20-
21-
## Development
22-
23-
To generate the website and serve it on [localhost:1313](http://localhost:1313)
24-
just execute this command and stop it with `Ctrl+C`:
25-
26-
```
27-
make server
28-
```
29-
30-
When you are done with your changes just create a pull request, after merging
31-
the pull request the website will be updated automatically.
32-
33-
## Contributing
34-
35-
Fork -> Patch -> Push -> Pull Request
6+
These docs are ingested by our [docs repo](https://gitea.com/gitea/gitea-docusaurus).
367

378
## Authors
389

docs/README_ZH.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,7 @@
44
[![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/Gitea)
55
[![](https://images.microbadger.com/badges/image/gitea/docs.svg)](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
66

7-
## 关于托管方式
8-
9-
本页面托管在我们 Docker 容器内的基础设施上, 它会在每次推送到 `master` 分支的时候自动更新,如果你想自己管理这个页面,你可以从我们的 Docker 镜像 [gitea/docs](https://hub.docker.com/r/gitea/docs/) 中获取它。
10-
11-
## 安装 Hugo
12-
13-
本页面使用了 [Hugo](https://github.com/spf13/hugo) 静态页面生成工具,如果您有维护它的意愿,则需要在本地计算机上下载并安装 Hugo。Hugo 的安装教程不在本文档的讲述范围之内,详情请参见 [官方文档](https://gohugo.io/overview/installing/)
14-
15-
## 如何部署
16-
17-
[localhost:1313](http://localhost:1313) 处构建和运行网站的命令如下,如果需要停止可以使用组合键 `Ctrl+C`:
18-
19-
```
20-
make server
21-
```
22-
23-
完成更改后,只需创建一个 Pull Request (PR),该 PR 一经合并网站将自动更新。
24-
25-
## 如何贡献您的代码
26-
27-
Fork -> Patch -> Push -> Pull Request
7+
https://gitea.com/gitea/gitea-docusaurus
288

299
## 关于我们
3010

docs/assets/js/search.js

Lines changed: 0 additions & 174 deletions
This file was deleted.

0 commit comments

Comments
 (0)