Skip to content

Publish documentation on GitHub Pages with DocFX - #571

Closed
linkdotnet wants to merge 1 commit into
masterfrom
docs/docfx-github-pages
Closed

linkdotnet wants to merge 1 commit into
masterfrom
docs/docfx-github-pages

Conversation

@linkdotnet

Copy link
Copy Markdown
Owner

Summary

Publishes the existing markdown documentation in docs/ as a static site on GitHub Pages, rendered with DocFX.

Why DocFX

  • The repo is .NET-only: DocFX is a pinned local tool (dotnet-tools.json) and needs no Python toolchain (unlike MkDocs).
  • It builds straight from docs/, so there is no second copy of the docs to keep in sync.
  • Links from MIGRATION.md into docs/ resolve because docfx.json sits at the repo root.

Changes

  • docfx.json, dotnet-tools.json, docs/toc.yml, docs/index.md: site configuration, navigation and landing page.
  • .github/workflows/docs.yml: builds with --warningsAsErrors on PRs (catches broken links), deploys to Pages on pushes to master.
  • 13 docs pages now start with an H1 (they started with H2/H3, leaving page titles empty); one relative link to a file outside docs/ became an absolute GitHub URL.
  • Readme.md links to the site and explains the local preview (dotnet tool restore, then dotnet docfx docfx.json --serve).
  • .gitignore ignores _site and obj.

Verification

  • dotnet docfx docfx.json --warningsAsErrors builds with 0 warnings, 0 errors.
  • Every key in the Configuration.md sample JSON exists in appsettings.json.

Screenshots

Landing page:

Docs landing page

Configuration page:

Configuration page

Before merging

  • Set Settings → Pages → Source to GitHub Actions.
  • The site will be served at https://linkdotnet.github.io/Blog/. For the root of a domain, configure a custom domain (and add a CNAME to the DocFX resources).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 7, 2026 13:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the documentation publishing changes.

No open issues 🎉

What changed in this PR

Publishes the existing Markdown documentation as a DocFX site on GitHub Pages, keeping docs/ as the source of truth.

Changes:

  • Adds pinned DocFX tooling, site configuration, navigation, and a landing page.
  • Adds documentation builds for pull requests and Pages deployment for pushes to master.
  • Updates page headings, fixes an external documentation link, and documents local preview commands.
File Description
Readme.md Links to the published site and explains local preview.
dotnet-tools.json Pins the local DocFX tool.
docs/​toc.yml Defines site navigation.
docs/​Storage/​Readme.md Promotes the page title to H1.
docs/​Setup/​Readme.md Promotes the page title to H1.
docs/​Setup/​Docker.md Promotes the page title to H1.
docs/​Setup/​Configuration.md Promotes the page title to H1.
docs/​SEO/​Readme.md Promotes the page title to H1.
docs/​Migrations/​UpgradeAssistant.md Links to the tool README on GitHub.
docs/​index.md Adds the documentation landing page.
docs/​Features/​Styling.md Promotes the page title to H1.
docs/​Features/​AdvancedFeatures.md Promotes the page title to H1.
docs/​Donations/​Readme.md Promotes the page title to H1.
docs/​Comments/​Readme.md Promotes the page title to H1.
docs/​Comments/​Giscus.md Promotes the page title to H1.
docs/​Comments/​Disqus.md Promotes the page title to H1.
docs/​Authorization/​Readme.md Promotes the page title to H1.
docs/​Authorization/​AzureAD.md Promotes the page title to H1.
docs/​Authorization/​Auth0.md Promotes the page title to H1.
docfx.json Configures content, resources, theme, and site metadata.
.gitignore Excludes generated DocFX output.
.github/​workflows/​docs.yml Builds documentation with warnings as errors and deploys to Pages.

Review effort: Balanced

@linkdotnet linkdotnet closed this Nov 11, 2026
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.

2 participants