aptabase / aptabase-swift

Swift SDK for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps
https://aptabase.com
MIT License
21 stars 8 forks source link

Add GitHub pages documentation site for package #6

Closed manucheri closed 1 year ago

manucheri commented 1 year ago

As discussed in https://github.com/aptabase/aptabase-swift/pull/5 here is the generated site based on the current source code, suitable for publishing on GitHub pages.

The generated code is put in the./docs folder.

From what I understand from the documentation the repository need to enable GitHub pages, and select a branch to use for publishing. This can either be the main branch or a separate branch used only for GitHub pages purposes. I'm personally fine with either.

@goenning I think you as the repository owner need to enable GitHub pages and point it to the correct branch (and also select the docs folder). This can be done after this PR is merged, but if we want a new branch we would need to create that first.

goenning commented 1 year ago

How do you generate the docs? I need to work on a release process for it so it's currently very manual :/

goenning commented 1 year ago

Here's the page https://aptabase.github.io/aptabase-swift/ but it doesn't seem to be working

manucheri commented 1 year ago

@goenning Nice! So the URL for the docs will be https://aptabase.github.io/aptabase-swift/documentation/aptabase/ (and I agree that is not really obvious and has some redundant parts but that is what Apple picked).

Does that URL work for you?

manucheri commented 1 year ago

Here is the command to generate the docs for publishing:

swift package --allow-writing-to-directory docs \
    generate-documentation --target Aptabase \
    --disable-indexing \
    --transform-for-static-hosting \
    --hosting-base-path aptabase-swift \
    --output-path docs

So it's either to run that every once in a while (when the public API has changed) or setup some GitHub Action if we want it generated automatically at every new commit.

goenning commented 1 year ago

That looks great, feels like an Apple docs page :)

Thanks for sharing the command, I'll add this to the GitHub action once I get there.