-
Notifications
You must be signed in to change notification settings - Fork 126
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
Any way to merge the index.json for multiple framework hosting on single Static site ? #745
Comments
You're right that the It might also be possible to merge the index data for every framework/module into a single file, however I believe the specification of that file was designed in a way to map to a single one, so I think the right thing to do would be to update both DocC and DocC-Render in a coordinated way to support multiple index files in a built single archive. |
I think the implementation of this will likely be heavily impacted by #317 |
I think this would work well. Could we build this in a backwards-compatible way, where DocC Render first tries to find the framework-specific index.json and falls back to a global one? |
@franklinsch I just hacked around locally and to me it honestly seems like it can be covered in a backwards-compatible way. Note, I'm not a project member / official contributor / whatever, but so far it seems like I could merry multiple library products in one doc'. But had to go pretty deep, like for example: {
"kind": "symbol",
"metadata": {
"externalID": "Beton",
"symbolKind": "module",
"role": "collection",
"title": "Beton",
"roleHeading": "Framework",
"modules": [
{
"name": "Beton"
+ },
+ {
+ "name": "XCTBeton"
+ },
]
},
/// ... btw, I just learned this cool "diff" feature from @vknabel Right path?I'm not sure though if this route I took was the right path, since practically in our case, though both Beton and XCTBeton are intentionally in the same Swift Package, they aren't practically different modules of the same Framework, but instead two libraries. One enhances Foundation and the other XCTest. These boxes shouldn't touch. Is help needed?I'm personally all up to put in some meat into this issue if someone, anyone could be my tourguide for an hour to teach me the ins and outs of this renderer and how things end up here from docc. I mean, for real. With an initial swing I'm willing to take responsibility for this issue. My company needs it ¯\(ツ)/¯ |
Merging the index is part of the plan for combined documentation for multiple targets in DocC. @franklinsch Should we move this issue to the swift-docc repository instead? |
Yes that makes sense. Is there a way by which @adam-rocska can help with some of the work? |
When we developed this feature with Ethan, afaik the As far as docc-render is concerned, there should be no extra work to do. If you navigate from |
@adam-rocska also happy to help if possible. |
May related to #328
Issue
Currently seems the
index.json
is used for left search filed searching the symbols.However, the
swift-docc-render/src/utils/data.js
here seems only support query single oneindex.json
in the whole site.So, for Static site hosting, does this means I need to merge all the other frameworks into the final big index json files ? Is there any tools to do this ?
Alternate way
Currently in my example, I change this into
index/${framework_name}/index.json
and hosting multiple frameworks documentation.The text was updated successfully, but these errors were encountered: