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: A MSTest project where MSTest test samples are placed.samples/tests/nunit: A NUnit project where NUnit test samples are placed.samples/tests/razor: A xUnit based test project where razor test samples are placed.samples/tests/xunit: A 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 shown in the documentation pages are correct and in working order.
To build and view the documentation locally, following a few steps is required:
- From
docs/siterundotnet build. If you get warnings from runningdotnet build, try running it again. - From
docs/runserve-docs.cmd. This will start up a local web server, hosting the generated documentation site on http://localhost:8080, using thedotnet servetool. - 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).