Table of Contents

Build and Deploy the Documentation

Setup

To set everything up, clone the oqtane.docs and the oqtane.framework repositories in the same parent folder (e.g., c:\projects\oqtane), creating a structure like:

some-root\
├── oqtane.docs
├── oqtane.framework

That will look like this:

Folder structure for Building

Build and Test Locally

Depending on your preferred toolchain, you can use

  1. VS Code (recommended🌟)
  2. Visual Studio 2022

Build and Test Locally using VS Code

  1. Run with VS Code:

    • Open the Oqtane.Docs.code-workspace workspace located in the /src folder.

    • Rebuild the entire solution

      • Either using Ctrl+Shift+B.

      • Or by hitting Ctrl + Shift + P and selecting "Run Task"
        VS Code Run Task
        ...and then "Build".
        VS Code Build

    • In the output you should then see a bunch of stuff - ending with Build Succeeded
      VS Code Build Successful

    • It is generated into the root /docs folder.

  2. Test Locally - three options:

Build and Test Locally using Visual Studio 2022

  1. Run with Visual Studio:

    • Open the Oqtane.Docs.sln solution located in the /src folder. VS 2022 Docs Solution

    • Rebuild the entire solution. It is generated into the root /docs folder. VS 2022 Build Successful

  2. Test Locally

    • Alternatively: Set up IIS to publish the /docs folder on a domain such as docs.oqtane.me.
Note

If you encounter build errors like shown below: VS 2022 Build Errors

VS 2022 Build Error Code 1

You may also need to execute the following commands in terminal:

  • Unblock-File -Path .\.config\dotnet-tools.json
  • dotnet tool restore

After running these commands, the build errors should be resolved.

VS 2022 Build Errors Resolved

Tip

To see your updates in the locally hosted IIS website, make sure to use the Rebuild Solution option.

VS 2022 Rebuild Solution

Publish / Deploy to GitHub

Push the result back to the repository. GitHub will automatically publish the updated documentation to https://docs.oqtane.org.

Questions

For further discussions, feedback, or questions, head over to GitHub Discussions or GitHub Issues.