The preview no longer shows the extension of the target. The output I'm seeing is:
========================================
Starting Local Preview Server
Address: http://localhost:8000/
========================================
Where it used to display the full path to the target:
http://localhost:8000/documentation/doccsnippetexample/
That root page also displays an error when you try to access it:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:8000/data/documentation/doccsnippetexample.json
And when I looked into the directory structure, the json file is located inside the target - so I'm suspecting there's been a slight adjustment somewhere and parts aren't quite aligned for where swift-docc-render looks for JSON files.
In the on-disk directory, the JSON file for this page resides at:
docs/data/documentation/doccsnippetexample/doccsnippetexample.json and I'm thinking that the preview server and docs-render is expecting to find it at docs/data/documentation/doccsnippetexample.json.
I'm uncertain, but suspect these might be related (target directory and broken link with preview), so I'm including them into a single report, but I'm happy to break them up as well.
Checklist
[X] If possible, I've reproduced the issue using the main branch of this package.
Description
Using the tools versioned with 5.7.0 release:
(This is also with the swift-docc-plugin branch of
main
to get snippets to work.)When I invoke swift package preview-documentation:
The preview no longer shows the extension of the target. The output I'm seeing is:
Where it used to display the full path to the target:
http://localhost:8000/documentation/doccsnippetexample/
That root page also displays an error when you try to access it:
And when I looked into the directory structure, the json file is located inside the target - so I'm suspecting there's been a slight adjustment somewhere and parts aren't quite aligned for where swift-docc-render looks for JSON files.
In the on-disk directory, the JSON file for this page resides at:
docs/data/documentation/doccsnippetexample/doccsnippetexample.json
and I'm thinking that the preview server and docs-render is expecting to find it atdocs/data/documentation/doccsnippetexample.json
.I'm uncertain, but suspect these might be related (target directory and broken link with preview), so I'm including them into a single report, but I'm happy to break them up as well.
Checklist
main
branch of this package.Expected Behavior
No response
Actual behavior
No response
Steps To Reproduce
For a reproduction case:
clone the repo:
git clone https://github.com/heckj/DoccSnippetExample
cd DoccSnippetExample
./docpreview.bash
(which invokes:
Swift-DocC Version Information
'5.7.0'
Swift Compiler Version Information