Generate RST Swift documentation for Sphinx.
Project description
swift-rst-docs
Python library, cli and Sphinx extension to generate documentation for Swift projects from SourceKitten output files.
Installation
$ pip install swift-rst-docs
$ brew install sourcekitten
Usage
You need to generate a JSON file with SourceKitten first.
To reference symbols in your documentation, place their full name between 4 backticks. For example: ``MyStructure.hello(world:)`` or ``MySwiftLibrary.MyStructure.hello(world:)`` when referencing from another module or the documentation's overview text. This will create a link to the symbol's page.
$ sourcekitten doc [--spm] [-- <swift / xcodebuild arguments>] > documentation.json
See the documentation for the various ways of generating documentation pages and an example of a generated Swift documentation. The example documentation is in the repo's docs/swift directory and the SourceKitten documentation files are generated from the tests/MySwiftPackage/generate-documentation.sh
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swift_rst_docs-2.1.tar.gz.
File metadata
- Download URL: swift_rst_docs-2.1.tar.gz
- Upload date:
- Size: 206.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be7bf4fd006675eb2b241e38952db01b3a095a5fd1e917c883af6368e42b7946
|
|
| MD5 |
969de65f6853520c4a4140479642dbf7
|
|
| BLAKE2b-256 |
28efb05fcaa4423a50e178d19a203c8bbc815af79ea6a2c986087bea69a26867
|
File details
Details for the file swift_rst_docs-2.1-py3-none-any.whl.
File metadata
- Download URL: swift_rst_docs-2.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
688dac85bf5eccd9436e9429e91d8e12f04161a047ad1bc834b9e1107110c102
|
|
| MD5 |
e2f55d9505d4abddf85a8960075e4948
|
|
| BLAKE2b-256 |
d9b003806b46c030f7e093c5d0599541242b0ed2b198b716b5f4e59977670c37
|