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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ jobs:
node-version: 20
- run: make deps-frontend
- run: make lint-md
- run: make docs # test if build could succeed
- run: make docs

actions:
if: needs.files-changed.outputs.actions == 'true' || needs.files-changed.outputs.actions == 'true'
Expand Down
19 changes: 6 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ help:
@echo " - clean delete backend and integration files"
@echo " - clean-all delete backend, frontend and integration files"
@echo " - deps install dependencies"
@echo " - deps-docs install docs dependencies"
@echo " - deps-frontend install frontend dependencies"
@echo " - deps-backend install backend dependencies"
@echo " - deps-tools install tool dependencies"
Expand Down Expand Up @@ -373,11 +372,11 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig

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

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

.PHONY: lint-css
lint-css: node_modules
Expand Down Expand Up @@ -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.


.PHONY: docs
docs: deps-docs
cd docs; make trans-copy clean build-offline;

.PHONY: deps-docs
deps-docs:
@hash hugo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
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; \
fi
docs:
cd docs; bash scripts/trans-copy.sh;

.PHONY: deps
deps: deps-frontend deps-backend deps-tools deps-docs deps-py
deps: deps-frontend deps-backend deps-tools deps-py

.PHONY: deps-py
deps-py: .venv
Expand Down
36 changes: 0 additions & 36 deletions docs/Makefile

This file was deleted.

31 changes: 1 addition & 30 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,7 @@
[![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/Gitea)
[![](https://images.microbadger.com/badges/image/gitea/docs.svg)](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")

## Hosting

These pages are hosted using [netlifycms](https://www.netlifycms.org/) and get
automatically updated on every push to the `master` branch.

## Install

These pages use the [Hugo](https://gohugo.io/) static site generator.
If you are planning to contribute you'll want to download and install Hugo on
your local machine.

The installation of Hugo is out of the scope of this document, so please take
the [official install instructions](https://gohugo.io/installation/) to
get Hugo up and running.

## Development

To generate the website and serve it on [localhost:1313](http://localhost:1313)
just execute this command and stop it with `Ctrl+C`:

```
make server
```

When you are done with your changes just create a pull request, after merging
the pull request the website will be updated automatically.

## Contributing

Fork -> Patch -> Push -> Pull Request
These docs are ingested by our [docs repo](https://gitea.com/gitea/gitea-docusaurus).

## Authors

Expand Down
22 changes: 1 addition & 21 deletions docs/README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,7 @@
[![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/Gitea)
[![](https://images.microbadger.com/badges/image/gitea/docs.svg)](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")

## 关于托管方式

本页面托管在我们 Docker 容器内的基础设施上, 它会在每次推送到 `master` 分支的时候自动更新,如果你想自己管理这个页面,你可以从我们的 Docker 镜像 [gitea/docs](https://hub.docker.com/r/gitea/docs/) 中获取它。

## 安装 Hugo

本页面使用了 [Hugo](https://github.com/spf13/hugo) 静态页面生成工具,如果您有维护它的意愿,则需要在本地计算机上下载并安装 Hugo。Hugo 的安装教程不在本文档的讲述范围之内,详情请参见 [官方文档](https://gohugo.io/overview/installing/)。

## 如何部署

在 [localhost:1313](http://localhost:1313) 处构建和运行网站的命令如下,如果需要停止可以使用组合键 `Ctrl+C`:

```
make server
```

完成更改后,只需创建一个 Pull Request (PR),该 PR 一经合并网站将自动更新。

## 如何贡献您的代码

Fork -> Patch -> Push -> Pull Request
https://gitea.com/gitea/gitea-docusaurus

## 关于我们

Expand Down
174 changes: 0 additions & 174 deletions docs/assets/js/search.js

This file was deleted.

Loading