Skip to content

swift-docc-plugin produces documentation for last target only #12

@JosephDuffy

Description

@JosephDuffy

Describe the bug
When using swift-docc-plugin to generate documentation any target's documentation will overwrite previously generated documentation. For example if a package has "TargetA" and "TargetB" and the command swift package --allow-writing-to-directory "./docs" generate-documentation --disable-indexing --output-path "./docs" --transform-for-static-hosting --hosting-base-path "PackageName" is run it will generate the documentation for "TargetA" and then "TargetB", but the documentation for "TargetB" will overwrite "TargetA".

To Reproduce
Steps to reproduce the behavior:

  1. Create a package with multiple targets
  2. Add swift-docc-plugin as a dependency
  3. Run swift package --allow-writing-to-directory "./docs" generate-documentation --disable-indexing --output-path "./docs" --transform-for-static-hosting --hosting-base-path "PackageName"

Expected behavior
A directory suitable for static hosting should be generated, which contains the documentation for "TargetA" and "TargetB".

I think the root index.html should provide links to both of these targets, but I'm not sure if this is an expected feature or a new feature request.

Screenshots
N/A

Environment (please complete the following information):

  • OS: macOS 12.3.1
  • Xcode Version/Tag/Branch: 13.3.3
  • swift-docc-plugin: 1.0.0

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions