Skip to content

Fix missing favicon.ico in offline documentation #4214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/fix-offline-favicon.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fix for missing favicon.ico in offline documentation

The favicon.ico file is now properly copied to the offline documentation,
ensuring the browser tab icon appears correctly when viewing the documentation
offline.
7 changes: 7 additions & 0 deletions tools/chmgen.d
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ void main(string[] args)
only(docRoot ~ `/favicon.ico`)
).array();

// Ensure favicon.ico is explicitly copied to root of offline documentation
if (chm && exists(docRoot ~ `/favicon.ico`))
{
stderr.writeln("Ensuring favicon.ico is properly copied");
copy(docRoot ~ `/favicon.ico`, chmDir ~ `/files/favicon.ico`);
}

foreach (filePath; files)
{
scope(failure) stderr.writeln("Error while processing file: ", filePath);
Expand Down