Step 1. Update scaffold
This document introduces what the scaffold is and how to update it.
Concept
In the pingcap-docsite-preview context, scaffold refers to a specific set of elements synchronized from pingcap/docs-staging. These elements are crucial for the structure and navigation of the documentation website. It contains the following elements:
Version selection: the
docs.jsonfileTable of contents: all
TOC.mdfiles in themarkdown-pagesdirectoryIndex pages: all
_index.mdfiles in themarkdown-pagesdirectoryHomepage: all
_docHome.mdfiles in themarkdown-pagesdirectory
An example of the scaffold
Update the scaffold in GitHub Actions
In your fork, the
sync_scaffold.ymlworkflow can be manually triggered (workflow_dispatch) or automatically triggered every 15 days (0 0 */15 * *) by default.on: workflow_dispatch: schedule: - cron: "0 0 */15 * *"To modify the schedule event or add more events to trigger the workflow, you can adjust the value of
onin thesync_scaffold.ymlfile.For more information, see Events that trigger workflows.
Update the scaffold locally
To update the scaffold of your fork on your local machine, you can execute the
sync_scaffold.shscript.This script automatically updates the scaffold to the latest version from
pingcap/docs-staging.To update the scaffold to a specific version, you can specify a branch or commit in
sync_scaffold.sh.Examples:
git clone https://github.com/Oreoxmt/pingcap-docsite-preview.git cd pingcap-docsite-preview ./sync_scaffold.shgit clone https://github.com/Oreoxmt/pingcap-docsite-preview.git cd pingcap-docsite-preview ./sync_scaffold.sh $BRANCHgit clone https://github.com/Oreoxmt/pingcap-docsite-preview.git cd pingcap-docsite-preview ./sync_scaffold.sh $COMMIT
