Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Web hosted documentation #63

Merged
merged 6 commits into from
Feb 15, 2024
Merged

[feat] Web hosted documentation #63

merged 6 commits into from
Feb 15, 2024

Conversation

matejmolnar
Copy link
Collaborator

This PR aims to solve this ticket

  • Remove unnecessary pragma marks
  • Add swift setting flag to enable DocC symbol links for code extensions
  • Add swift DocC plugin and generate_docs.sh script file for generating static web documentation files
  • Move classes related documentation to appropriate files instead of keeping it in documentation.md/README.md
  • Update outdated documentation
  • Update README with links to the web hosted documentation, which won't be working until we push the changes to master and someone with admin access sets the github pages like so:
Screenshot 2024-01-17 at 15 08 39

@cejanen
Copy link
Collaborator

cejanen commented Jan 23, 2024

Just sharing first feelings... 793 files changed easily... 🧩

@matejmolnar
Copy link
Collaborator Author

@cejanen I know 😅, but It's mostly generated files for the static web docs.

Copy link
Collaborator

@cejanen cejanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I haven't read all texts but "smekam". I don't know if you used any special tool to generate those texts specially to showcase usage of classes but respect.
So far I'm just curious why do we remove readme file?
Another question. Can I test somehow that the docs will work as expected before merging and updating repo settings as described in PR notes.

README.md Show resolved Hide resolved
@matejmolnar
Copy link
Collaborator Author

matejmolnar commented Jan 31, 2024

Honestly I haven't read all texts but "smekam". I don't know if you used any special tool to generate those texts specially to showcase usage of classes but respect. So far I'm just curious why do we remove readme file? Another question. Can I test somehow that the docs will work as expected before merging and updating repo settings as described in PR notes.

Thank you for the kind words 🙏. No I didn't use any tool to generate the usage documentation.

You can test the documentation by running

swift package --disable-sandbox preview-documentation --target Networking

It will start a local preview server with the documentation.

@johnkodes
Copy link
Contributor

@matejmolnar someone with admin access sets the github pages like so: this is done 👍

Copy link
Collaborator

@cejanen cejanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanna see it live 🥇

Copy link
Contributor

@johnkodes johnkodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the changes a lot 🙇 . Few comments 🙏

Package.swift Show resolved Hide resolved
Sources/Networking/Core/APIManager.swift Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come that for example TCA doesn't have all of those CSS/JS files 🤔 😄 ? Do you know how can that be achieved?

https://github.com/pointfreeco/swift-composable-architecture/tree/main/Sources/ComposableArchitecture/Documentation.docc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some projects use a special branch which includes just the documentation, so that's what I though they were doing as well. But upon a closer inspection I found out that it's not the case, but they are actually using Jekyll to build the documentation in a github action

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good catch, how did you find it? 😄 So yeah that's how they do it and they also use Jekyll on top. When I was talking to @cejanen about the separate branch, he said to not worry about it for now and just put the docs into the master branch. But yeah once we would like to also keep multiple versions of the documentation a separate branch is the way to go 🙂

Copy link
Contributor

@johnkodes johnkodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love if we could have the docs hidden elsewhere (eg. in the separate branch), but this is more than enough ☺️ . Thank you 👍

@matejmolnar matejmolnar merged commit 9687308 into dev Feb 15, 2024
@matejmolnar matejmolnar deleted the feat/web-hosted-docs branch February 15, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants