mirror of
https://gitea.com/gitea/docs.git
synced 2026-06-11 12:41:27 +00:00
c82e0fcc8d716a6b59bebb621a5be3aec0118ef1
Close #4
Right now on MacOS, sed will produce backup files, because on Mac, If do something like below using bash script
```
$SED_INPLACE '1s/---/---\nisOutdated: true/' $file
```
It will become the following on executed, and a backup file will be produced:
```
sed -i ''\'''\''' '1s/---/---\nisOutdated: true/' ./docs/content/doc/help/faq.zh-cn.md
```
The way to fix this in this PR is to change the `SED_INPLACE` to a function. [Reference](aa19c2d125/generate-cpp.sh (L4)) (Tested on my
Mac and backup files with suffix '' will not be produced after changing to function)
Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/36
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
Gitea Docusaurus
How to build
make clean
make build
Development
make clean
make serve
Test en version
npm run start
Test zh-cn version
npm run start -- --locale zh-cn
Translate presets for zh-cn version
npx docusaurus write-translations --locale zh-cn
Test both zh-cn and en versions
npm run build
npm run serve
Description
Languages
MDX
55.9%
JavaScript
26.7%
CSS
13.8%
Shell
2.4%
Makefile
1.2%