Building the ASP.NET Core Docs
Use Chocolatey to install Python. Then use pip to install Sphinx, a theme, and the Sphinx .NET domain. Add Chocolatey's Python Scripts location to the PATH. Then clone the docs repository from GitHub, navigate one of its subfolders, and build the docs with make.
PowerShell
choco install python -y -fpip install sphinx pip install -U sphinxrtdtheme pip install sphinxcontrib-dotnetdomain
$pythonScripts = 'c:\programdata\chocolatey\lib\python3\tools\Scripts' [Environment]::SetEnvironmentVariable('PATH', $env:PATH + $pythonScripts, 'Machine')
cd C:\GitHub\ git clone git@github.com:aspnet/Docs.git aspnet-docs cd aspnet-docs cd aspnet
.\make.bat html
Now we can go to file:///C:/GitHub/aspnet-docs/aspnet/_build/html/index.html and see our pretty docs. :)
Notes
- Chocolatey installs Python to `C:\ProgramData\Chocolatey\bin`.
- To check the Python install use `python -i` to show the version.
- To check the PATH use `$env:PATH.split(';')` from PowerShell.
- To check where pip installs packages, run `pip list -v`.
References