Skip to content

feat: Allow extensionless URL HTML file access#10436

Merged
yufeih merged 2 commits into
dotnet:mainfrom
filzrev:feat-allow-extensionless-htmlurl
Jan 27, 2025
Merged

feat: Allow extensionless URL HTML file access#10436
yufeih merged 2 commits into
dotnet:mainfrom
filzrev:feat-allow-extensionless-htmlurl

Conversation

@filzrev

@filzrev filzrev commented Nov 28, 2024

Copy link
Copy Markdown
Collaborator

This PR is intended to add support for extensionless HTML URLs for docfx serve command.

Background
GitHub Pages support extensionless URLs. (e.g. https://dotnet.github.io/docfx/docs/basic-concepts)
And other static HTML hosting site also have similar features.

So I thought it's reasonable to support extensionless URLs with the docfx serve command.

Extensionless URL support is partially related to #2865.
It might be better to add options to output extensionless URLs for docfx internal links.

@filzrev filzrev changed the title feat: Allow extensionless HTML URL access feat: Allow extensionless URL HTML file access Nov 28, 2024
@filzrev filzrev force-pushed the feat-allow-extensionless-htmlurl branch from 58072f4 to 8cca247 Compare December 3, 2024 07:55
Comment thread src/Docfx.App/RunServe.cs
@filzrev filzrev force-pushed the feat-allow-extensionless-htmlurl branch from 8cca247 to 0f2d784 Compare December 25, 2024 22:23
@codecov

codecov Bot commented Dec 25, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 20 lines in your changes missing coverage. Please review.

Project coverage is 79.28%. Comparing base (fe673ec) to head (307c9f4).
Report is 504 commits behind head on main.

Files with missing lines Patch % Lines
src/Docfx.App/RunServe.cs 0.00% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10436      +/-   ##
==========================================
+ Coverage   74.31%   79.28%   +4.96%     
==========================================
  Files         536      547      +11     
  Lines       23189    23649     +460     
  Branches     4056     4065       +9     
==========================================
+ Hits        17234    18749    +1515     
+ Misses       4853     3730    -1123     
- Partials     1102     1170      +68     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yufeih yufeih merged commit f649a48 into dotnet:main Jan 27, 2025
@yufeih yufeih added the new-feature Makes the pull request to appear in "New Features" section of the next release note label Jan 27, 2025
pmdevers pushed a commit to pmdevers/MinimalKafka that referenced this pull request Mar 20, 2026
Updated [docfx](https://github.com/dotnet/docfx) from 2.77.0 to 2.78.4.

<details>
<summary>Release notes</summary>

_Sourced from [docfx's
releases](https://github.com/dotnet/docfx/releases)._

## 2.78.4

# 🚀 Release Notes

## 🌟 New Features
- 🧩 Updated to **Roslyn 4.13.0** and added `.NET 10` nightly build
support. ([#​10577](dotnet/docfx#10577),
[#​10561](dotnet/docfx#10561))

## 🐞 Bug Fixes
- ✅ Include `[Experimental]` attribute support by default.
([#​10566](dotnet/docfx#10566))
- ✅ Include global type metadata for all output formats.
([#​10611](dotnet/docfx#10611))
- ✅ Skip non-managed assemblies to prevent runtime errors.
([#​10692](dotnet/docfx#10692))
- ✅ Fix TOC grouping regression introduced by earlier refactor.
([#​10700](dotnet/docfx#10700))
- ✅ Fix Bicep.js import error on the samples site.
([#​10738](dotnet/docfx#10738))
- ✅ Handle `IOException` gracefully when file access conflicts occur.
([#​10786](dotnet/docfx#10786))
- ✅ Fix PDF generation failure when navigating within the same page or
hash fragment. ([#​10768](dotnet/docfx#10768))
- ✅ Use `textContent` to correctly render header titles.
([#​10790](dotnet/docfx#10790))
- ✅ Fixed nightly build CI and dependency updates.
([#​10679](dotnet/docfx#10679),
[#​10694](dotnet/docfx#10694))
- ✅ Added event handling for `AnalyzerLoadFailed` to improve debugging.
([#​10617](dotnet/docfx#10617))

## ⚡ Performance Improvements
- ⚙️ Use cached `MarkdownPipeline` instance to reduce re-initialization
overhead. ([#​10568](dotnet/docfx#10568))
- ⚙️ Reuse `YamlDeserializer` instance for better memory efficiency.
([#​10567](dotnet/docfx#10567))
- ⚙️ Migrated test assertions to **AwesomeAssertions** for faster,
cleaner test runs.
([#​10563](dotnet/docfx#10563))
- ⚙️ Improved analyzer diagnostics and reduced noisy suggestions.
([#​10578](dotnet/docfx#10578))

## 📘 Documentation Updates
- 📄 Minor doc fix and `.slnx` inclusion.
([#​10610](dotnet/docfx#10610))
- 📄 Fixed config reference documentation.
([#​10683](dotnet/docfx#10683))
- 📄 Corrected PlantUML class diagram link.
([#​10638](dotnet/docfx#10638))
- 📄 Updated “Tabs with ***” section formatting.
([#​10699](dotnet/docfx#10699))
- 📄 Fixed minor spelling errors.
([#​10723](dotnet/docfx#10723))
- 📄 Updated Bicep sample to use official Highlight.js syntax.
([#​10715](dotnet/docfx#10715))
- 📄 Added DeepWiki badge and improved emoji font embedding in PDF
generation. ([#​10680](dotnet/docfx#10680),
[#​10678](dotnet/docfx#10678))
- 📄 Inputs in navigation and TOC search now auto-focus when icons are
clicked. ([#​10754](dotnet/docfx#10754))

## 🙌 Contributors
Thanks to our awesome contributors for this release:  
**@​filzrev**, **@​Lombra**, **@​frarees**, **@​ettfemnio**,
**@​Lulalaby**, **@​mgarstenauer**, **@​anthony-c-martin**,
**@​clicktodev**, **@​Copilot**, and everyone who helped improve this
release 💙


## 2.78.3

<!-- Release notes generated using configuration in .github/release.yml
at main -->

## What's Changed
### 🎉 New Features
* feat: Add `noRestore` option to `docfx metadata` command by @​filzrev
in dotnet/docfx#10428
* feat: Allow extensionless URL HTML file access by @​filzrev in
dotnet/docfx#10436
* feat: Add `.slnx` solution format metadata generation support by
@​filzrev in dotnet/docfx#10540
* feat!: search improvements by @​frarees in
dotnet/docfx#10113
### 🐞 Bug Fixes
* fix: Add `remarks` content to enum members by @​filzrev in
dotnet/docfx#10434
* fix: Modify `isCoverPage` check conditions by @​filzrev in
dotnet/docfx#10453
* fix: Use provided references for search of dependencies in
AssemblyCompilations by @​Herrmel in
dotnet/docfx#10491
* fix: Doc comment `<code>` block is not rendered correctly by @​filzrev
in dotnet/docfx#10390
### 🚀 Performance Improvements
* perf: Optimize pdf generation performance by reducing file I/O by
@​filzrev in dotnet/docfx#10461
* perf: Reduce exceptions of `APIPage` deserialization by @​filzrev in
dotnet/docfx#10548
## New Contributors
* @​Herrmel made their first contribution in
dotnet/docfx#10491

**Full Changelog**:
dotnet/docfx@2.78.2...v2.78.3

## 2.78.2

<!-- Release notes generated using configuration in .github/release.yml
at main -->

## What's Changed
### 🎉 New Features
* feat: Reformat YouTube videos to the embeded URL by @​hultqvist in
dotnet/docfx#10372
### 🐞 Bug Fixes
* fix: Fix Node.js prerequisite issues by @​filzrev in
dotnet/docfx#10406
* fix: System.Reflection.Metadata.Document.Name can throw BadImageForma…
by @​RobJessop in dotnet/docfx#10410
* fix: Bootstrap variable override problem by @​filzrev in
dotnet/docfx#10412
* fix: Skip header/footer rendering for cover page by @​filzrev in
dotnet/docfx#10416
### 📄 Documentation
* docs: Add how to use docfx nightly version by @​filzrev in
dotnet/docfx#10394
### 💪 Other Changes
* chore: Add published package tests to nightly build workflow by
@​filzrev in dotnet/docfx#10403
* chore: Update `Dockerfile` by @​filzrev in
dotnet/docfx#10407

## New Contributors
* @​hultqvist made their first contribution in
dotnet/docfx#10372

**Full Changelog**:
dotnet/docfx@2.78.1...2.78.2

## 2.78.1

<!-- Release notes generated using configuration in .github/release.yml
at main -->

## What's Changed
### 🐞 Bug Fixes
* fix: Place `.playwright` directory under bin directory by @​filzrev in
dotnet/docfx#10399
* fix: Use PlantUML Online Server as default configs by @​filzrev in
dotnet/docfx#10395


**Full Changelog**:
dotnet/docfx@v2.78.0...2.78.1

## 2.78.0

<!-- Release notes generated using configuration in .github/release.yml
at main -->

This release introduces support for .NET 9 and drops support for .NET 6,
with a wide range of bug fixes and improvements.
A big thank you to @​filzrev for continuous improvements to DocFX and to
@​SimonCropp for the [substantial
contributions](https://github.com/dotnet/docfx/issues?q=is%3Apr+author%3ASimonCropp)
to code quality in this project!

## What's Changed
### 💥 Breaking Changes
* feat: Add .NET 9 support (and drop .NET 6 support) by @​filzrev in
dotnet/docfx#10239
* feat: Change generated HTML encoding to UTF-8N (without BOM) by
@​filzrev in dotnet/docfx#10069
### 🎉 New Features
* feat: Remove Node.js runtime dependencies from docfx tools by
@​filzrev in dotnet/docfx#10066
* feat: UseClrTypeNames: new option to indicate that the output must use
the CLR type names instead of the language specific aliases by
@​Patrick8639 in dotnet/docfx#10072
* feat: pdfHeaderTemplate/pdfFooterTemplate supports value as file path
by @​yufeih in dotnet/docfx#10099
* feat: expose type through the toc by @​frarees in
dotnet/docfx#10090
* feat: Add `CancellationToken` support for `RunBuild.Exec` by @​filzrev
in dotnet/docfx#10185
* feat: add `AllowUnsafeBlocks` supports for source code based metadata
generation by @​filzrev in dotnet/docfx#10175
* feat: Add System.Text.Json serialization/deserialization supports by
@​filzrev in dotnet/docfx#10217
### 🐞 Bug Fixes
* fix: PDF Header/Footer pages size by @​filzrev in
dotnet/docfx#10100
* fix: missing delegate group name by @​frarees in
dotnet/docfx#10114
* fix: prevent the first navbar element from being set as active
unnecessarily in the modern template by @​KubaZ2 in
dotnet/docfx#10204
* fix: NullReferenceException thrown when running tests in parallel by
@​filzrev in dotnet/docfx#10181
* fix: change link as plaintext if API is excluded by @​filzrev in
dotnet/docfx#10300
* fix: suppress assembly load warning for wpf 8.0 project by @​yufeih in
dotnet/docfx#10303

### 📄 Documentation
* docs: update ConceptualDocumentProcessor reference by
@​emmanuel-ferdman in dotnet/docfx#10237
* docs: Update Version in "Use the NuGet Library" by @​RiPont in
dotnet/docfx#10233
* docs: Add Publish from Azure DevOps by @​kale-swapnil in
dotnet/docfx#10213
* docs: fixed article a/an in config.md by @​MorkovnySok in
dotnet/docfx#10272
* docs: Add node.js as prerequisite by @​filzrev in
dotnet/docfx#10299
* docs: Document the xref `nameWithType` option by @​AArnott in
dotnet/docfx#10368

## New Contributors
* @​frarees made their first contribution in
dotnet/docfx#10090
* @​KubaZ2 made their first contribution in
dotnet/docfx#10204
* @​emmanuel-ferdman made their first contribution in
dotnet/docfx#10237
* @​RiPont made their first contribution in
dotnet/docfx#10233
* @​kale-swapnil made their first contribution in
dotnet/docfx#10213
* @​MorkovnySok made their first contribution in
dotnet/docfx#10272
* @​AArnott made their first contribution in
dotnet/docfx#10368

**Full Changelog**:
dotnet/docfx@v2.77.0...v2.78.0

Commits viewable in [compare
view](dotnet/docfx@v2.77.0...v2.78.4).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docfx&package-manager=nuget&previous-version=2.77.0&new-version=2.78.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature Makes the pull request to appear in "New Features" section of the next release note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants