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

[Doc] Link to doc/contributing.rdoc from CONTRIBUTING.md #4266

Merged
merged 3 commits into from Apr 3, 2021

Conversation

kachick
Copy link
Member

@kachick kachick commented Mar 13, 2021

https://github.com/ruby/ruby/blob/c7e6914b3947cdf0e9c0d28d1162a084d0138887/doc/contributing.rdoc looks the active one of How to contribute. So adding link in CONTRIBUTING.md might help someone like me 🙏

In my case...
I often forgot How to test specific test file with the built ruby?
Nothing in README. And I can't find it in https://bugs.ruby-lang.org/projects/ruby/wiki/HowToContribute

But the rdoc describes as below.

This is also how you can run a specific test from our build dir:

make test-all TESTS=drb/test_drb.rb

It solved all. ☺️

CONTRIBUTING.md Outdated

[official issue tracker]: https://bugs.ruby-lang.org
[contributing.rdoc]: https://github.com/ruby/ruby/blob/master/doc/contributing.rdoc
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be a link to the local file?

Suggested change
[contributing.rdoc]: https://github.com/ruby/ruby/blob/master/doc/contributing.rdoc
[contributing.rdoc]: rdoc-ref:contributing.rdoc

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I don't know the feature rdoc-ref! 😮
Is it a RDoc feature? So can't we use it in Markdown?

https://github.com/ruby/ruby/blob/db0ad48309edae28a65e3d18e9b3a15753eda777/doc/NEWS-3.0.0.md

Above doc having similar style, it shows GFM as below

スクリーンショット 2021-03-22 1 10 15

And this change so on...

c5795c3
https://github.com/ruby/ruby/blob/c5795c37e61de30df15501e48ad61167e5841953/CONTRIBUTING.md

スクリーンショット 2021-03-22 1 10 35

Do we need to handle .md files as a rdoc in this repository?

Copy link
Member

Choose a reason for hiding this comment

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

It is possible in also RDoc's Markdown, but GitHub doesn't support it of course, even in *.rdoc files.
In RDoc, "rdoc-ref:" link generates a URL from the path under the certain rule.
I made ruby/rdoc#800 to enable it for explicit references without the prefix.
Once this gets applied, the above link no longer needs the prefix.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for the rdoc improvement! 😂

I have applied your suggestion cc779f4

$ rdoc --version
6.3.0
$ rdoc CONTRIBUTING.md --op tmp-rdoc
$ open tmp-rdoc/CONTRIBUTING_md.html

スクリーンショット 2021-03-22 13 53 20

It looks not a link 🤔
It makes same even if adding doc/ prefix as rdoc-ref:doc/contributing.rdoc.
But https://docs.ruby-lang.org/en/master/doc/NEWS-3_0_0_md.html shows as link.

スクリーンショット 2021-03-22 13 55 19

Hmm… Definitely I do not know something about rdoc 🙇

Copy link
Member

Choose a reason for hiding this comment

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

ruby/rdoc#800 is not merged yet.
And it doesn't change the result for "rdoc-ref:", the line needs to be [doc/contributing.rdoc]: doc/contributing.rdoc without the schema prefix.

Copy link
Member Author

Choose a reason for hiding this comment

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

https://github.com/ruby/ruby/blob/f2ad63b361236df26aae33a19c851f106e752b1b/CONTRIBUTING.md

スクリーンショット 2021-03-22 17 32 46

Ah… I may understand it finally. 😓
f2ad63b is this correct understanding?
I didn't know Markdown can use relative path, This is so useful!

Copy link
Member

Choose a reason for hiding this comment

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

Exactly.

CONTRIBUTING.md Outdated Show resolved Hide resolved
kachick added a commit to kachick/ruby that referenced this pull request Mar 21, 2021
kachick added a commit to kachick/ruby that referenced this pull request Mar 22, 2021
This patch by nobu (Nobuyoshi Nakada)

ref: ruby#4266 (comment)

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This patch by nobu (Nobuyoshi Nakada), thank you!

ref: ruby#4266 (comment)

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
@nobu nobu merged commit 6b906ad into ruby:master Apr 3, 2021
@kachick
Copy link
Member Author

kachick commented Apr 3, 2021

Thank you! 🙏

Of course I am appreciating to ruby/rdoc#800 😂

@kachick kachick deleted the improve-contributing-doc branch April 3, 2021 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants