Oqtane Documentation
Here we'll explain how the documentation works, with all the magic in it.
The Basics
Tip
The Oqtane.Docs
project generates the documentation for Oqtane using docfx.
So for the most part, you'll want to read the docfx documentation
to understand how it works.
The Source Code
This project has a src
folder containing...
- markdown files in
/pages
for standalone docs pages - markdown files in
/apidoc
for merging with XML-docs in the source of Oqtane - various YAML files (
.yml
) which describe the navigation structure - Solution (
.sln
) and project (.csproj
) files to build the documentation - docfx configurations (
docfx.json
andfilterConfig.yml
) - various json configs so it also works in VS-Code
It also requires the Oqtane.Framework
project to be in a sibling folder (see setup)
The Build Process
flowchart TD
CS[Oqtane C# Source\n<code>../../oqtane.framework</code>] -->|⚙️Compiler| XD
XD["Xml Docs\n(temp)"] --> MD["Merged API Docs\n(temp)"]
DM[Docs Mixins\n~/apidocs] --> MD
CONTENT[Content/Articles\n~/pages] --> Docs[Docs HTML\n../docs/]
ASS[Assets/Images\n**/assets] --> Docs
MD --> Docs
TOC["TOC Files\n**/toc.yml"] --> TOCG
Docs -->|generate| TOCG["Various TOCs\n(Tables of Contents)"]
When you build this project, it will
- Compile Oqtane
- Extract the XML documentation from Oqtane and generate YAML and markdown files
- Merge the generated files with the ones in this project
- Generate a
../docs
folder with static HTML files that can be hosted anywhere
Note
To test the generated docs locally,
you'll need to host the ../docs
folder on a web server.
This is because there are some absolute paths used in some JavaScripts
for the TOC (table of contents) and search functionality.
The setup is explained below.
Deployment
When pushed back to Github, Github will automatically build and deploy to https://docs.oqtane.org
Setup
👉 continue with Setup, Build, Test and Deploy