Giter Club home page Giter Club logo

Comments (8)

adam-rocska avatar adam-rocska commented on August 22, 2024 2

@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.
they're in the same Package & repo because they would otherwise cross-depend in a weird way.

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 ¯\(ツ)

from swift-docc.

franklinsch avatar franklinsch commented on August 22, 2024 1

Yes that makes sense. Is there a way by which @adam-rocska can help with some of the work?

from swift-docc.

TosinAF avatar TosinAF commented on August 22, 2024 1

@adam-rocska also happy to help if possible.

from swift-docc.

mportiz08 avatar mportiz08 commented on August 22, 2024

You're right that the index.json is currently hardcoded to fetch the navigator data for a single framework. Ideally, I think there should be multiple "index" JSON files that map to each individual framework/module so that this kind of hosting setup is achievable (similar to your described workaround).

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.

from swift-docc.

mportiz08 avatar mportiz08 commented on August 22, 2024

I think the implementation of this will likely be heavily impacted by #317

from swift-docc.

franklinsch avatar franklinsch commented on August 22, 2024

Ideally, I think there should be multiple "index" JSON files that map to each individual framework/module so that this kind of hosting setup is achievable (similar to your described workaround).

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?

from swift-docc.

d-ronnqvist avatar d-ronnqvist commented on August 22, 2024

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?

from swift-docc.

dobromir-hristov avatar dobromir-hristov commented on August 22, 2024

When we developed this feature with Ethan, afaik the index.json was meant to hold multiple technologies in case we support those in the future, as @d-ronnqvist said.

As far as docc-render is concerned, there should be no extra work to do. If you navigate from FooKit to BarKit it should just try to find those in the JSON, for the language you are on.

from swift-docc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.