Skip to content

Problems running docs project locally #1307

@Jcparkyn

Description

@Jcparkyn

Describe the bug

There seem to be a few issues with running the docs project locally (I'm putting them all in one issue because I assume most are related):

  1. The docs readme says to run docfx from docs/, but this gives an error Cannot find config file [...]\bUnit\docs\docfx.json. Should this be docfx site/docfx.json or "run from docs/site/"?

  2. I get a compilation error when running docfx:

error: C:\Users\James\Files\git\ext\bUnit\src\bunit.web\Extensions\Internal\CssSelectorElementFactory.cs(6,51): error CS0246: The type or namespace name 
'IElementWrapperFactory' could not be found (are you missing a using directive or an assembly reference?)
  1. From docs-deploy.yml, it looks like I shouldn't even be running docfx and instead use dotnet run Site.csproj?

  2. Due to the above compilation error, the API spec doesn't get generated (with either of the above methods) unless I set "allowCompilationErrors": true in docfx.json.

  3. docfx.min.js doesn't get loaded due to "Cannot use import statement outside a module". This is fixed by setting type="module" on the relevant script tag.

  4. The deployed docs don't have correct formatting for block quotes (e.g. see "The current thread is not associated" at https://bunit.dev/docs/interaction/trigger-renders.html) - but this seems to be fixed when running locally.

  5. Typo in "Verfiy docs samples" in docs-deploy.yml (doesn't cause any issues).

Version info:

  • bUnit version: n/a
  • .NET Runtime and Blazor version: n/a (.NET 8 SDK)
  • OS type and version: Windows 10

Additional context:

I think some or all of these are related to #1286

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions