This folder contains the PnP Core SDK documentation. The documentation system is based upon DocFX and combines inline code comments (the so called triple slash comments) with articles written in MD format. The resulting generated documentation is hosted on https://pnp.github.io/pnpcore.
The document generation consists of 3 steps outlined below, currently these are manual steps, but we plan to automate them via GitHub Actions:
- Extract the PnP Core SDK into YML based API documentation: use
docfx.exe metadata docfx.json
- Build the documentation: in this step the YML API documentation and the articles are merged into a documentation site. Use
docfx.exe build docfx.json
and then check the generated_site
folder - To check locally, Use
docfx.exe build docfx.json --serve
to build the site and host on http://localhost:8080 - On submission, the generated documentation site is automatically generated by GitHub Actions on acceptance of PR submission.
Note
Install the latest DocFX release to get docfx.exe
To run anywhere add docfx directory to your environment variables in windows
Setting up the gh-pages branch as an orphaned branch was done using the steps outlined in https://www.gep13.co.uk/blog/how-to-create-gh-pages-branch. To actually work with both "code" and "docs" branches it's easiest to git clone
the repo twice, once for coding and once for publishing documents to the gh-pages
branch.
We strongly encourage documentation contributions which can be done via improving API documentation (via the triple slash comments in the source code) or creating/updating articles in the articles
folder.
Credit to Oscar Vásquez https://ovasquez.github.io/docfx-material/ for awesome work on the skin.