There are a couple of patches required to support this, but they should be available on GitHub. SwiftDocC: use "portable" paths for file names by compnerd · Pull Request #668 · apple/swift-docc · GitHub might be the important one. There is some work that is needed in the render Vue application to get the adjusted behaviour for portable file names that needs to be worked out, but most of the other issues should've been worked out.
The Preview Server is not avalable on Windows due to NIO being a dependency, but you can use python as a stand in (IIRC, python -m http.server -d . in the generated docc bundle).
Unfortunately, each time I try to compile Docc on windows 10, Swift 5.9, I get this error:
error: command Compiling Swift Module 'SwiftDocC' (424 sources) failed: unable to spawn process 'C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swiftc.exe' (The filename or extension is too long.
)
I have tried the official repository (main) and also Saleem's fork on different branches (main, portable, windows) but not luck with the above error
The question is: Given the situation that all issues for a Windows version of DocC are fixed, I guess an according DocC will be part if the “next” toolchain version for Windows, so why not wait a little bit?
This is due to the toolchain version. There were fixes to SPM in 5.10 that are required. As those bills have not been setup yet, you would need to use the latest main snapshot.
This is not guaranteed to be immediate. There’s still two issues left to be resolved:
The use of portable paths (see the patch)
The changes required in the render application (more complicated
Additionally, given the number of branches, it does require some assistance to ensure that changes make it into the right release.