docs(mkdocs): update batch script

This commit is contained in:
2025-03-26 04:05:08 -07:00
parent f8a2bdd464
commit 5f1f9f7fff
2 changed files with 27 additions and 21 deletions

View File

@@ -6,15 +6,19 @@ MODE con:cols=125 lines=120
MODE 125,40
GOTO comment_end
Starts up mkdocs from a windows system.
Ensure you have defined `GH_TOKEN` or the git-committers plugin will rate limit you.
@usage Starts up mkdocs from a windows system.
Ensure you have defined `GH_TOKEN` or the git-committers plugin will rate limit you.
setx /m GH_TOKEN "github_pat_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
setx /m GH_TOKEN "github_pat_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
If using a Github Workflow, create a new secret in the repo settings named `GH_TOKEN`
and give it your Github fine-grained personal access token.
If using a Github Workflow, create a new secret in the repo settings named `GH_TOKEN`
and give it your Github fine-grained personal access token.
The token variable is defined in mkdocs.yml
The token variable is defined in mkdocs.yml
@update use the following commands to update mkdocs and the mkdocs-material theme:
pip install --upgrade mkdocs
pip install --upgrade --force-reinstall mkdocs-material
:comment_end
@@ -30,28 +34,33 @@ set dir_home=%~dp0
:: define: env variable
:: #
set TOKEN=%GH_TOKEN2%
echo --------------------------------------------------------------------------------
echo ------------------------------------------------------------------------------------------------
echo Mkdocs Launcher
echo --------------------------------------------------------------------------------
IF [!TOKEN!]==[] (
echo --------------------------------------------------------------------------------
echo GH_TOKEN not defined. Open %0%
echo Create a new one at https://github.com/settings/personal-access-tokens
echo --------------------------------------------------------------------------------
set /P TOKEN= Enter Github Personal Access Token (fine-grained):
echo ------------------------------------------------------------------------------------------------
IF "!GH_TOKEN!"=="" (
echo GH_TOKEN not defined.
echo Open %0%
echo Create a new one at:
echo https://github.com/settings/personal-access-tokens
echo ------------------------------------------------------------------------------------------------
set /p TOKEN=" Enter Github Personal Access Token (fine-grained): "
)
echo GH_TOKEN: !TOKEN!
echo GH_TOKEN: !GH_TOKEN!
echo.
echo.
echo Creating environment variable GH_TOKEN
setx GH_TOKEN "!GH_TOKEN!"
timeout 2 > NUL
:: #
:: start mkdocs
:: #
echo Starting mkdocs ...
start cmd /k "mkdocs serve --clean"
timeout 5 > NUL