This folder contains the documentation site for bUnit.
Here is a small getting started guide for contributing to the documentation...
- The
sitefolder contains the code for generating the documentation site, and the documentation in markdown files, located insite/docs. - The
samplesfolder projects for the sample code that is displayed in the documentation. It has the following projects:
samples/components: A Blazor component library project where components under test are placed.samples/tests/mstest: An MSTest project where MSTest test samples are placed.samples/tests/nunit: An NUnit project where NUnit test samples are placed.samples/tests/razor: An xUnit-based test project where razor test samples are placed.samples/tests/xunit: An xUnit project where xUnit C#-only test samples are placed.
These sample components, source files, and tests source files are included in the documentation using DocFx's Code Snippet syntax. They are created as real projects, making them runnable, which helps ensure that the code samples shown in the documentation pages are correct and in working order.
The following chapter describes how you can run and view the documentation locally
You will need the following tools installed:
- The
dotnet servetool - DocFx to generate the html files
- From
docs/siterundotnet build. If you get warnings from runningdotnet build, try running it again. - From
docs/rundocfx. This will generate all the html site based on the markdown files. - From
docs/runserve-docs.cmd. This will start up a local web server, hosting the generated documentation site. - After changing samples from
docs/samples, rundotnet test. This will compile the sample components and run the sample tests.
- All pages should have a YAML header with a
UIDto make it easy to cross reference between pages - All page and code references should be created using the
xref:UIDcross reference syntax. - By default, you should include code snippets as sample files in the
samplesprojects, using the code snippet syntax. - All code snippets should use 2 spaces as an indention unit (1 tab = 2 spaces).