8000 Add documentation workflow. by ioquatix · Pull Request #2313 · rack/rack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add documentation workflow. #2313

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

Merged
merged 2 commits into from
Mar 25, 2025
Merged

Add documentation workflow. #2313

merged 2 commits into from
Mar 25, 2025

Conversation

ioquatix
Copy link
Member
@ioquatix ioquatix commented Mar 20, 2025

Generate the RDoc and push it to GitHub pages.

https://rack.github.io/rack/

@ioquatix ioquatix force-pushed the documentation-workflow branch from 63b14cf to 06719e4 Compare March 20, 2025 06:58
@ioquatix ioquatix force-pushed the documentation-workflow branch from 06719e4 to fb40960 Compare March 20, 2025 07:02
@ioquatix ioquatix force-pushed the documentation-workflow branch from fb40960 to 5ec8f3a Compare March 20, 2025 07:03
@ioquatix ioquatix force-pushed the documentation-workflow branch from 5ec8f3a to 21101c8 Compare March 20, 2025 07:10
@ioquatix ioquatix force-pushed the documentation-workflow branch from 21101c8 to 9870bc4 Compare March 20, 2025 07:19
@ioquatix ioquatix force-pushed the documentation-workflow branch from dff122b to 74f1b78 Compare March 20, 2025 10:19
@ioquatix ioquatix force-pushed the documentation-workflow branch from 74f1b78 to f00afb5 Compare March 20, 2025 10:23
@ioquatix ioquatix force-pushed the documentation-workflow branch from f00afb5 to b6d6c15 Compare March 20, 2025 10:32
@ioquatix ioquatix marked this pull request as ready for review March 20, 2025 10:45
@ioquatix ioquatix force-pushed the documentation-workflow branch from 7ef9a3a to 7daa3bc Compare March 20, 2025 10:49
@ioquatix ioquatix force-pushed the documentation-workflow branch from 7daa3bc to 0a2192e Compare March 20, 2025 10:51
@ioquatix ioquatix requested a review from jeremyevans March 20, 2025 11:01
Copy link
Member
@tenderlove tenderlove left a comment

Choose a reason for hiding this comment

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

I think this is fine but it would be nice if we didn't need to use a fork of RDoc.

Copy link
Contributor
@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

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

I think this looks good. Thanks for working on it. I have one requested change, and then I'm OK merging this.

@ioquatix ioquatix requested a review from jeremyevans March 21, 2025 04:28
st0012 added a commit to ruby/rdoc that referenced this pull request Mar 21, 2025
This allows us to parse the alt text from Markdown images, formatting a
header text correctly (using the alt text).

Without this PR, if a Markdown file has an image instead of a title,
that image will be used in the table of contents, which is unreadable
and undesirable.

Used in <rack/rack#2313>.

---------

Co-authored-by: Stan Lo <stan001212@gmail.com>
@ioquatix ioquatix force-pushed the documentation-workflow branch 2 times, most recently from 32db6b3 to 45e220f Compare March 23, 2025 20:53
@ioquatix ioquatix force-pushed the documentation-workflow branch from 226dbb4 to 4e74a89 Compare March 23, 2025 20:59
@ioquatix ioquatix enabled auto-merge (rebase) March 23, 2025 21:05
Copy link
Contributor
@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

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

Assuming I understand this correctly, this means rack.github.io will reflect the main branch. I don't think that's a good idea. I think we should change it to reflect the most recent release (3.1.12). The vast majority of our users are using rack via gems, not running the main branch, and the documentation should be targeted at them. We would not want a user running the latest release version to look at the documentation, try something based on it, and find out it doesn't work because the feature isn't in any release.

We could consider subdirectories per version (e.g. 2.2, 3.0, 3.1), but that's probably more difficult to setup.

@samuel-williams-shopify
Copy link
samuel-williams-shopify commented Mar 24, 2025

Unfortunately GitHub pages is per repository and there is no per-branch feature. It would make situations like this simpler.

I normally run my documentation from main but (try to) list the version availability in the documentation, e.g. we have a change log which lists features which are as yet unreleased.

While I understand your point, I'm against running the documentation workflow on 3-1-stable branch (or other stable branches) in this PR. No matter what, the issue you suggest will be a problem (half our user base is still on Rack 2.2). In addition, we don't backport documentation fixes/changes, so I think you've under-estimated the amount of work required to make the documentation look good on 3-1-stable.

A better solution is for us to clearly document the intended version support in the code, e.g. "This class was introduced in Rack 2.2" or "This method was introduced in Rack 3.1". That is a lot of work, but also has significant benefit for users. Another solution would be to simply say "This documentation is for the main branch of Rack, some features may not be released yet". I'm happy to add that to the readme so that users at least are made aware.

Finally, I'm not against a follow up PR to address this more holistically, e.g. having separate sets of documentation per version, e.g. generating documentation from released gems in addition to the main branch. However, I think that's out of scope for this PR.

@jeremyevans
Copy link
Contributor

I'm not in favor of adding documentation to methods explaining when they were introduced. Can we generate the documentation for main in /main? For now, we could add a redirect from ///index.html to /main. That will allow us to easily support versioned documentation at /3.1, /3.0, /2.2, etc. in the future, and have /index.html show links to the available versions.

@ioquatix ioquatix merged commit 5a37b32 into main Mar 25, 2025
33 checks passed
@ioquatix ioquatix deleted the documentation-workflow branch March 25, 2025 00: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.

4 participants
0