mirror of
https://gitea.com/gitea/docs.git
synced 2026-06-24 21:26:09 +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:
@@ -21,7 +21,7 @@ $SED_INPLACE 's/{{< min-go-version >}}/1.20/' docs/installation/from-source.en-u
|
||||
|
||||
$SED_INPLACE 's/"version":.*/"version":"1.20-dev"/' static/latest-swagger.json
|
||||
|
||||
for file in `find ./docs/ -name "*.md"`; do
|
||||
for file in `find ./docs -name "*.md"`; do
|
||||
# hide hugo toc
|
||||
$SED_INPLACE 's/{{< toc >}}//' $file
|
||||
$SED_INPLACE 's/dl.gitea.com\/gitea\/{{< version >}}/dl.gitea.com\/gitea\/main/g' $file
|
||||
@@ -44,6 +44,8 @@ for file in docs/*; do
|
||||
rm $file || true
|
||||
done
|
||||
|
||||
for file in `find ./docs/ -name "*.en-us.md"`; do
|
||||
# file names under docs/ and i18n/zh-cn/docusaurus-plugin-content-docs/current/ should be the same for docusaurus
|
||||
# to recognize them as tanslated.
|
||||
for file in `find ./docs -name "*.en-us.md"`; do
|
||||
mv "${file}" "${file/.en-us/}"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user