-
Notifications
You must be signed in to change notification settings - Fork 167
Description
Description
The project is a Swift package exposing several librairies.
Each library has its own DocC markup file and a resources folder with images to add in documentation.
These images appear in the Xcode documentation viewer and also in the built documentation from Xcode (i.e. dedicated Xcode window).
However, when this documentation is built for a static web site, with the combined target experimental features gathering all documentation of all librairies for my Swift package, I face the following issues: the images do not appear in the web pages as the files are not loaded
The command:
swift package \
--allow-writing-to-directory "$DOCUMENTATION_HTML_LOCATION" \
generate-documentation \
--enable-experimental-combined-documentation \
--target OUDS \
--target OUDSModules \
--target OUDSComponents \
--target OUDSThemesOrange \
--target OUDSThemesOrangeInverse \
--target OUDSThemesOrangeBusinessTools \
--target OUDSThemesSosh \
--target OUDSThemesWireframe \
--target OUDSTokensComponent \
--target OUDSTokensSemantic \
--target OUDSTokensRaw \
--target OUDSFoundations \
--output-path "$DOCUMENTATION_HTML_LOCATION" \
--transform-for-static-hosting \
--warnings-as-errors \
--symbol-graph-minimum-access-level publicThe issue
For example, given my landing page, I spot in the web browser console the following 404 error traces in the attachment below
For example, my page tried to load an image at https://ios.unified-design-system.orange.com/images/ic_modular.svg, however the expected URL should be https://ios.unified-design-system.orange.com/images/OUDSModules/ic_modular.svg.
For this case the folder of the library, here OUDSModules is ignored and the tool tries to load images from root images folder it generates.
Not sure if related to #1257
Resources
- The Package.swift
- The project
- The script I use to build the doc
Checklist
- If possible, I've reproduced the issue using the
mainbranch of this package. - This issue hasn't been addressed in an existing GitHub issue.
Expected Behavior
Load the URL with the expected path
Actual behavior
The path is not the expected one, imaes are searched in a bad location, library folder is missing
Steps To Reproduce
- macOS Sequoia 15.6
- Xcode 16.2
Swift-DocC Version Information
I do not know of to get it
Swift Compiler Version Information
swift-driver version: 1.120.5 Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
Target: x86_64-apple-macosx15.0