Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unable to apply modern template on fresh DocFX project following quick start guide #8847

Closed
jameswilky opened this issue Jun 6, 2023 · 2 comments
Labels
bug A bug to fix

Comments

@jameswilky
Copy link

jameswilky commented Jun 6, 2023

Describe the bug
I created a fresh docFX project using the steps provided in the quick start guide, and followed the instructions to supply the 'modern' template, but no template changes are being applied.

To Reproduce

  1. dotnet tool update -g docfx
  2. docfx init --quiet
  3. docfx docfx_project/docfx.json --serve
  4. update docfx.json with properties specified in the docs

Noticed that the default docfx file ships with these settings in the docfx file:

    "template": [
      "default"
    ],

The docs say that it should be "templates", so i tried the following combinations with no success

  • "template":["default","modern"]
  • "templates":["default","modern"]
  • "template":["modern"]
  • "templates":["modern"]

The site builds fine and runs but its still using the default template:
image

This is my build output log:

PS C:\code\docfx_project> docfx docfx.json --serve
[23-06-06 11:19:00.795]Info:[MetadataCommand.ExtractMetadata]Using msbuild C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin as inner compiler.
[23-06-06 11:19:00.824]Info:[MetadataCommand.ExtractMetadata]No files are found with glob pattern src/**.csproj, excluding <none>, under directory "C:\code\docfx_project"
[23-06-06 11:19:01.006]Warning:[MetadataCommand.ExtractMetadata]No project detected for extracting metadata.
[23-06-06 11:19:01.009]Info:[MetadataCommand]Completed Scope:MetadataCommand in 260.6692 milliseconds.
[23-06-06 11:19:01.118]Info:[BuildCommand]6 plug-in(s) loaded.
[23-06-06 11:19:01.142]Info:[BuildCommand]No files are found with glob pattern apidoc/**.md, excluding obj/**,_site/**, under directory "C:\code\docfx_project"
[23-06-06 11:19:01.144]Info:[BuildCommand]No files are found with glob pattern images/**, excluding <none>, under directory "C:\code\docfx_project"
[23-06-06 11:19:01.159]Info:[BuildCommand]Markdown engine is markdig
[23-06-06 11:19:01.301]Info:[BuildCommand.BuildCore.Build Document]Max parallelism is 12.
[23-06-06 11:19:01.891]Info:[BuildCommand.BuildCore.Build Document.CompilePhaseHandlerWithIncremental.TocDocumentProcessor]Building 3 file(s) in TocDocumentProcessor(BuildTocDocument)...
[23-06-06 11:19:01.892]Info:[BuildCommand.BuildCore.Build Document.CompilePhaseHandlerWithIncremental.ConceptualDocumentProcessor]Building 0 file(s) in ConceptualDocumentProcessor(BuildConceptualDocument=>CountWord=>ValidateConceptualDocumentMetadata)...

[23-06-06 11:19:02.202]Info:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.Apply Templates]Applying templates to 6 model(s)...
[23-06-06 11:19:02.370]Info:[BuildCommand.BuildCore.Build Document]XRef map exported.
[23-06-06 11:19:02.476]Info:[BuildCommand.Postprocess]Manifest file saved to manifest.json.
[23-06-06 11:19:02.504]Info:[BuildCommand]Completed building documents in 1381.4435 milliseconds.
Serving "C:\code\docfx_project\_site" on http://localhost:8080

Expected behavior
For modern template to be applied

Context (please complete the following information):

  • OS: Windows 10
  • .NET 6.0.401 SDK installed
  • .NET 7.0.302 SDK installed
@jameswilky jameswilky added the bug A bug to fix label Jun 6, 2023
@jameswilky jameswilky changed the title [Bug] Unable to Apply Modern Template on Fresh DoxFX project following quick start guide [Bug] Unable to apply modern template on fresh DocFX project following quick start guide Jun 6, 2023
@filzrev
Copy link
Contributor

filzrev commented Jun 7, 2023

It seems old version of docfx.exe is executed. (.NET global tool version is installed but is not executed)
Check following command results. (if using PowerShell console. run where.exe instead)

where docfx
docfx --version

In my environment. following results are returned.

%UserProfile%.dotnet\tools\docfx.exe
2.67.3+f28165af43dde2ec072a79fa2479f475fcd947ad

filzrev added a commit to filzrev/docfx that referenced this issue Jun 7, 2023
@jameswilky
Copy link
Author

@filzrev Legend!

Thanks that fixed my issue. I can now create the site with the modern template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug to fix
Projects
None yet
Development

No branches or pull requests

2 participants