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 files
However, 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 -f
cd /path/to/this/repo
python3 scripts/md2doc-v2.py docs/zh/docs/kpanda # Generate Word files
The above is an example to generate documentation for the
kpanda
folder.
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 pandoc
Currently, 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_dir
for the folder name to be readoutput_path
for the location to export the PDF
- Run the
mkdocs build
command, ensuring that the poetry environment is properly configured- Use
poetry install
to install the dependencies - Run
poetry run mkdocs build -f pdf.yaml
to 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.