mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-02 17:08:48 +00:00
Add outdated component to outdated documents (#25)
- `git log` needs all commit history to compare latest commit of files, so changed `git clone --depth=1` to `git clone`. This will make the step take longer, so might be improved if there is a better way. - `src/theme/MDXContent/index.js` is from [ejecting of the component](https://docusaurus.io/docs/swizzling#ejecting) inside `@docusaurus/theme-classic` plugin, and this one is safe to eject according to docusaurus   - [Outdated component style reference](https://mui.com/material-ui/react-alert/) - Added [`Translate` component](https://docusaurus.io/docs/next/docusaurus-core#translate) to `Outdated` so it can be localized. [reference](https://docusaurus.io/docs/next/i18n/tutorial#translate-your-react-code) - One way to check for the specific outdated documents: search for `lastest commit timestamp` in [prepare nightly docs and prepare 1.19 docs steps](https://gitea.com/gitea/gitea-docusaurus/actions/runs/74) # After The Chinese documents that are outdated (latest commit is ealier than laster commit of English version):    Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/25 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: HesterG <hestergong@gmail.com> Co-committed-by: HesterG <hestergong@gmail.com>
This commit is contained in:
6
Makefile
6
Makefile
@@ -13,10 +13,11 @@ create_dir:
|
||||
|
||||
.PHONY: clone_main
|
||||
clone_main: create_dir
|
||||
git clone --depth=1 --branch=main https://github.com/go-gitea/gitea.git .tmp/upstream-docs-latest
|
||||
git clone --branch=main https://github.com/go-gitea/gitea.git .tmp/upstream-docs-latest
|
||||
cur_path=`pwd`
|
||||
cd .tmp/upstream-docs-latest/docs && make trans-copy
|
||||
cd $(cur_path)
|
||||
bash check_outdated.sh latest zh-cn
|
||||
|
||||
.PHONY: prepare-latest
|
||||
prepare-latest: clone_main
|
||||
@@ -37,10 +38,11 @@ prepare-latest-zh-cn:
|
||||
|
||||
.PHONY: clone_\#%
|
||||
clone_\#%: create_dir
|
||||
git clone --depth=1 --branch=release/v1.$* https://github.com/go-gitea/gitea.git .tmp/upstream-docs-$*
|
||||
git clone --branch=release/v1.$* https://github.com/go-gitea/gitea.git .tmp/upstream-docs-$*
|
||||
cur_path=`pwd`
|
||||
cd .tmp/upstream-docs-$*/docs && make trans-copy
|
||||
cd $(cur_path)
|
||||
bash check_outdated.sh $* zh-cn
|
||||
|
||||
.PHONY: prepare\#%
|
||||
prepare\#%: clone_\#%
|
||||
|
||||
Reference in New Issue
Block a user