swiftlang/swift-docc

Support a relative path for the options to "link to source" for the --target-path CLI option

Offen

#490 geöffnet am 24.02.2023

 (8 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Swift (181 Forks)auto 404
enhancementgood first issue

Repository-Metriken

Stars
 (1.356 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 24T 11h) (33 gemergte PRs in 30 T)

Beschreibung

Feature Name

support relative paths for --target-path

Description

I started trying to use the feature for including links to hosted online source, as described in Distributing Documentation to Other Developers.

The --target-path option currently requires an absolute path to the location to reference the source, and it would tremendously more convenient if this were provided in the form of a relative path.

Per a thread in swift forums, Franklin made a reference to a likely location for the possible enhancement.

Motivation

Allowing a relative path makes any CI/scripted work significantly easier for generating documentation, as it more easily divorces the location from the machine. It's possible to work around this in a shell script (something like "$(dirname $(dirname $(filepath $0)))", as seen in https://github.com/apple/swift-markdown/blob/main/bin/update-gh-pages-documentation-site), but that's not common knowledge or easily found.

Importance

Entirely an ease-of-use scenario

Alternatives Considered

No response

Contributor Guide