English | 中文
The following command can be used to batch generate a complete Word file that includes all documents.
cd /path/to/this/repo
python3 scripts/md2doc-v2.py docs/zh/docs # Generate Word filesHowever, the resulting Word file will contain all the content from docs.daocloud.io, making it difficult to read.
Currently, this command generates a large number of Word files. Make sure not to commit them to GitHub.
It is recommended to run the following command before submitting a PR to remove cached Word files:
find ./docs -type f -name "*.docx" ! -name "TiDBonHwameiStor.docx" | xargs rm -fcd /path/to/this/repo
python3 scripts/md2doc-v2.py docs/zh/docs/kpanda # Generate Word filesThe above is an example to generate documentation for the
kpandafolder.
If there are any errors during export, you can try running the following command to install the required dependencies:
pip install python-docx
brew install pandocCurrently, generating a full PDF file for all documents fails due to the large size of the complete documentation.
Not supported at the moment.
- Modify the pdf.yaml file, only modifying 2 fields:
docs_dirfor the folder name to be readoutput_pathfor the location to export the PDF
- Run the
mkdocs buildcommand, ensuring that the poetry environment is properly configured- Use
poetry installto install the dependencies - Run
poetry run mkdocs build -f pdf.yamlto generate the PDF files
- Use
The secondary development of the documentation site is based on an open-source project. Currently, the supported features are limited, but they will be improved in the future.