Skip to content

Fix DocFX configuration and add automatic light/dark theme support#67

Merged
Chris-Wolfgang merged 5 commits intodevelopfrom
copilot/update-docfx-configuration
Feb 3, 2026
Merged

Fix DocFX configuration and add automatic light/dark theme support#67
Chris-Wolfgang merged 5 commits intodevelopfrom
copilot/update-docfx-configuration

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

Description

Fixes the DocFX documentation generation configuration and adds automatic light/dark theme switching based on system preference with manual override.

Type of change

  • Documentation update

How Has This Been Tested?

  • Built documentation locally with docfx metadata && docfx build
  • Verified theme switching in browser (Auto/Light/Dark modes)
  • Confirmed system preference detection via prefers-color-scheme
  • Tested theme persistence across page navigation
  • Validated JSON formatting complies with .editorconfig

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

Light Theme (System Preference or Manual)

Dark Theme (System Preference or Manual)

API Documentation - Dark Mode

API Documentation - Light Mode

Additional context

DocFX Configuration Changes:

  • Fixed project path from placeholder src/<path>/<project>.csproj to actual path src/Wolfgang.Extensions.IAsyncEnumerable/Wolfgang.Extensions.IAsyncEnumerable.csproj
  • Added TargetFramework: net8.0 property to resolve multi-target build issues
  • Set _appName to "IAsyncEnumerable Extensions" and _appTitle to "Wolfgang.Extensions.IAsyncEnumerable Documentation"
  • Reordered templates from ["modern", "default"] to ["default", "modern"] to enable modern theme features
  • Fixed JSON indentation to use 2 spaces instead of tabs per .editorconfig requirements

Build Output Management:

  • Removed generated _site/manifest.json from repository
  • Added docfx_project/_site/, docfx_project/api/, and docfx_project/obj/ to .gitignore

Theme Behavior:

  • Default: Follows system prefers-color-scheme setting
  • Manual: Theme switcher in top-right corner (Light/Dark/Auto)
  • Persistence: User preference stored in localStorage
  • Implementation: Bootstrap 5.3 with data-bs-theme attribute

These changes enable DocFX to properly generate API documentation with method descriptions, parameters, return values, and exceptions, while providing a modern GitHub-style theme with automatic light/dark mode support.

Original prompt

I need help with my docfx.yaml file. When the workflow runs it should be creating documentation with that includes all the methods in the library, along with description of the method, parameters and return value


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Chris-Wolfgang <210299580+Chris-Wolfgang@users.noreply.github.com>
Copilot AI changed the title [WIP] Update docfx.yaml to include method documentation Fix DocFX configuration to generate complete API documentation Feb 3, 2026
Copilot AI requested a review from Chris-Wolfgang February 3, 2026 00:37
Co-authored-by: Chris-Wolfgang <210299580+Chris-Wolfgang@users.noreply.github.com>
Copilot AI changed the title Fix DocFX configuration to generate complete API documentation Add automatic light/dark theme support to DocFX documentation Feb 3, 2026
@Chris-Wolfgang Chris-Wolfgang marked this pull request as ready for review February 3, 2026 00:46
Copilot AI review requested due to automatic review settings February 3, 2026 00:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates DocFX configuration so the generated documentation site uses the modern template’s built-in light/dark/auto theme behavior, and cleans up/ignores generated output.

Changes:

  • Reordered DocFX templates (default then modern) so modern styling/theme switching takes precedence.
  • Updated DocFX metadata generation to point at the real library .csproj and target net8.0; set documentation site name/title metadata.
  • Removed a generated _site/manifest.json file and added DocFX output folders to .gitignore.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
docfx_project/docfx.json Points DocFX at the actual project, pins metadata generation TFM, and adjusts template order/metadata to enable modern theme behavior.
docfx_project/_site/manifest.json Removes generated build artifact from the repo.
.gitignore Ensures DocFX build outputs (_site, api, obj) aren’t tracked going forward.

Co-authored-by: Chris-Wolfgang <210299580+Chris-Wolfgang@users.noreply.github.com>
Copilot AI changed the title Add automatic light/dark theme support to DocFX documentation Fix DocFX configuration and add automatic light/dark theme support Feb 3, 2026
@Chris-Wolfgang Chris-Wolfgang changed the base branch from main to develop February 3, 2026 01:12
@Chris-Wolfgang Chris-Wolfgang merged commit 392622c into develop Feb 3, 2026
7 checks passed
@Chris-Wolfgang Chris-Wolfgang deleted the copilot/update-docfx-configuration branch February 3, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants