MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / step_mkdocs

Function step_mkdocs

Scripts/generate_docs.py:191–201  ·  view source on GitHub ↗

mode = 'serve' | 'build

(mode: str)

Source from the content-addressed store, hash-verified

189# ──────────────────────────────────────────────────────────────────────────────
190
191def step_mkdocs(mode: str):
192 """mode = 'serve' | 'build'"""
193 import copy
194 env = copy.copy(os.environ)
195 env['PYTHONIOENCODING'] = 'utf-8' # needed for emoji in generated pages on Windows
196 cmd = ['mkdocs', mode]
197 if mode == 'build':
198 cmd.append('--clean')
199 print(f"\n─── Step 4: Running `mkdocs {mode}` ───")
200 print(f" Working dir: {PLUGIN_ROOT}")
201 subprocess.run(cmd, cwd=PLUGIN_ROOT, check=True, env=env)
202
203# ──────────────────────────────────────────────────────────────────────────────
204# Main

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected