Skip to content

docc process-archive transform-for-static-hosting doesn't preserve custom header/footer HTML from --experimental-enable-custom-templates #1532

Description

@heckj

Description

While working with creating the combined documentation for Swift, I'm explicitly doing a post-processing command the change the hosting base path, and found that it's regenerating a stripped stub for every symbol where the hosting base path changes, loosing any custom injected HTML header or footer data.

Checklist

  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue.

Expected Behavior

I was anticipating that the first archive in the merge set would set the stage for the HTML included, and then the hosting base path could be adjusted without impacting what injected HTML content in each of the stubs.

Actual behavior

After docc convert (or docc merge), the resulting archive's index.html correctly contains custom-header/custom-footer templates. I expected process-archive transform-for-static-hosting to either preserve those templates in the per-route stubs it generates, or copy them through verbatim. Instead, every generated stub is a bare shell.

Steps To Reproduce

  1. create archive with customer header/footer
  2. apply a hosting base path
  3. view using python -m http.server with the relevant location reflected
  4. note the missing HTML

Swift-DocC Version Information

6.3.2

Swift Compiler Version Information

Apple Swift version 6.3.2 (swift-6.3.2-RELEASE)
Target: arm64-apple-macosx26.0

(also applicable on `main`)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctly

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions