dotnet / dotnet/docfx

[Feature Request] Add feature to load `coverPage`/`headerTemplate`/`footerTemplate` from cofig directory based path

Open
#10,454 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

**Is your feature request related to a problem? Please describe.**
Currently following file paths must be specified as `relative to the root of the output directory` (`_site`).
1. [coverPage](https://dotnet.github.io/docfx/docs/pdf.html#pdfcoverpage)
2. [headerTemplate/footerTemplate](https://dotnet.github.io/docfx/docs/pdf.html#pdfheadertemplate)

**Describe the solution you'd like**
1. `coverPage` HTML should be loaded from `configDirectory` based relative path. Then fallback to `outputFolder` based relative path.
It's required because it need to support `cover.md` -> `cover.html` support for backward compatibility.
2. `headerTemplate`/`footerTemplate` should loaded from `configDirectory` instead of `outputFolder` based relative path.
On current version. It's loaded from `outputFolder` based relative path.
But it seems not works property (See: #10414). So it need to copy `pdf/*.html` files as resource files.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.