[Feature Request] Enable SystemMetadataGenerator to never use a relative path but always an absolute path
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 890
- Avg merge
- 2h 9m
- Merged PRs (30d)
- 11
Description
**Is your feature request related to a problem? Please describe.**
I want any asset or page to use absolute links from the root of the website (to be configured in this mode).
Goal is to be able to configure the base of the website on github pages (or any similar system).
Instead of having for subfolders something like `../../public/docfx.min.js` I'd like to get `/myproject/public/docfx.min.js` and so on.
This issue pops obviously for pages not stored in the URL path folder. A common example is `404.html` - created from `404.md` - which will be served when hitting `/myproject/foo/bar/whatever/not/existing`.
**Describe the solution you'd like**
Ideally I'd like to put in header metadata on `404.md` a flag to use absolute path for this page - but if global for all pages I'm happy too.
**Describe alternatives you've considered**
For now I added a js script in the page to redirect on the actual 404 page url when the subfolder is not matching the hosting but this changes the url and is not satisfying.
Contributor guide
Research direction
Start by locating SystemMetadataGenerator and reviewing how it produces links for pages, assets, and 404.md. Check the generated output for nested pages and the 404 page under a configured site base path; done means links consistently use the requested absolute root path without relying on relative traversal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100