{"id":13872078,"url":"https://github.com/swiftlang/swift-docc-plugin","last_synced_at":"2025-12-11T23:02:20.011Z","repository":{"id":37055465,"uuid":"428449354","full_name":"swiftlang/swift-docc-plugin","owner":"swiftlang","description":"Swift Package Manager command plugin for Swift-DocC","archived":false,"fork":false,"pushed_at":"2025-07-06T14:09:35.000Z","size":2081,"stargazers_count":363,"open_issues_count":21,"forks_count":53,"subscribers_count":108,"default_branch":"main","last_synced_at":"2025-12-06T17:26:15.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://swiftpackageindex.com/swiftlang/swift-docc-plugin/documentation/swiftdoccplugin","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swiftlang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-15T23:08:52.000Z","updated_at":"2025-11-30T08:03:05.000Z","dependencies_parsed_at":"2024-09-10T13:10:32.106Z","dependency_job_id":"3297fe32-c7be-49fe-8002-e1a20a58a2c6","html_url":"https://github.com/swiftlang/swift-docc-plugin","commit_stats":{"total_commits":34,"total_committers":11,"mean_commits":3.090909090909091,"dds":0.5882352941176471,"last_synced_commit":"106fd09cc69dfa610cb12770f6aee59671aed109"},"previous_names":["swiftlang/swift-docc-plugin","apple/swift-docc-plugin"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/swiftlang/swift-docc-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-docc-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-docc-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-docc-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-docc-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swiftlang","download_url":"https://codeload.github.com/swiftlang/swift-docc-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-docc-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27549180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-06T02:00:06.463Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T23:00:33.293Z","updated_at":"2025-12-11T23:02:19.964Z","avatar_url":"https://github.com/swiftlang.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# Swift-DocC Plugin\n\nThe Swift-DocC plugin is a Swift Package Manager command plugin that supports building\ndocumentation for SwiftPM libraries and executables.\n\n## Usage\n\nPlease see \n[the plugin's documentation](https://swiftlang.github.io/swift-docc-plugin/documentation/swiftdoccplugin/)\nfor more detailed usage instructions.\n\n### Adding the Swift-DocC Plugin as a Dependency\n\nTo use the Swift-DocC plugin with your package, first add it as a dependency:\n\n```swift\nlet package = Package(\n    // name, platforms, products, etc.\n    dependencies: [\n        // other dependencies\n        .package(url: \"https://github.com/swiftlang/swift-docc-plugin\", from: \"1.1.0\"),\n    ],\n    targets: [\n        // targets\n    ]\n)\n```\n\nSwift 5.6 is required in order to run the plugin.\n\n### Converting Documentation\n\nYou can then invoke the plugin from the root of your repository like so:\n\n```shell\nswift package generate-documentation\n```\n\nThis will generate documentation for all compatible targets defined in your package and its dependencies \nand print the location of the resulting DocC archives.\n\nIf you'd like to generate documentation for a specific target and output that\nto a specific directory, you can do something like the following:\n\n```shell\nswift package --allow-writing-to-directory ./docs \\\n    generate-documentation --target MyFramework --output-path ./docs\n```\n\nNotice that the output path must also be passed to SwiftPM via the \n`--allow-writing-to-directory` option. Otherwise SwiftPM will throw an error\nas it's a sandbox violation for a plugin to write to a package directory without explicit\npermission.\n\nAny flag passed after the `generate-documentation` plugin invocation is passed\nalong to the `docc` command-line tool. For example, to take advantage of Swift-DocC's new support\nfor hosting in static environments like GitHub Pages, you could run the following:\n\n```shell\nswift package --allow-writing-to-directory ./docs \\\n    generate-documentation --target MyFramework --output-path ./docs \\\n    --transform-for-static-hosting --hosting-base-path MyFramework\n```\n\n### Previewing Documentation\n\nThe Swift-DocC plugin also supports previewing documentation with a local web server. However,\nunlike converting documentation, previewing is limited to a single target a time.\n\nTo preview documentation for the MyFramework target, you could run the following:\n\n```shell\nswift package --disable-sandbox preview-documentation --target MyFramework\n```\n\nTo preview documentation for a product defined by one of your package's dependencies,\nyou could run the following:\n\n```shell\nswift package --disable-sandbox preview-documentation --product OtherFramework\n```\n\n### Hosting Documentation\n\nFor details on how to best build documentation for hosting online and a specific\ntutorial for publishing to GitHub Pages, please see \n[the plugin's documentation](https://swiftlang.github.io/swift-docc-plugin/documentation/swiftdoccplugin/).\n\n## Bug Reports and Feature Requests\n\n### Submitting a Bug Report\n\nThe Swift-DocC plugin tracks all bug reports with \n[GitHub Issues](https://github.com/swiftlang/swift-docc-plugin/issues).\nWhen you submit a bug report we ask that you follow the\n[provided template](https://github.com/swiftlang/swift-docc-plugin/issues/new?template=BUG_REPORT.md)\nand provide as many details as possible.\n\nIf you can confirm that the bug occurs when using the latest commit of the Swift-DocC plugin\nfrom the `main` branch, that will help us track down the bug faster.\n\n### Submitting a Feature Request\n\nFor feature requests, please feel free to file a\n[GitHub issue](https://github.com/swiftlang/swift-docc-plugin/issues/new?template=FEATURE_REQUEST.md)\nor start a discussion on the [Swift Forums](https://forums.swift.org/c/development/swift-docc).\n\nDon't hesitate to submit a feature request if you see a way\nthe Swift-DocC plugin can be improved to better meet your needs.\n\nAll user-facing features must be discussed\nin the [Swift Forums](https://forums.swift.org/c/development/swift-docc)\nbefore being enabled by default.\n\n## Contributing to the Swift-DocC Plugin\n\nPlease see the [contributing guide](/CONTRIBUTING.md) for more information.\n\n\u003c!-- Copyright (c) 2022 Apple Inc and the Swift Project authors. All Rights Reserved. --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftlang%2Fswift-docc-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftlang%2Fswift-docc-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftlang%2Fswift-docc-plugin/lists"}