rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

Display "generated with <commit sha>" in the footer

Open st0012 opened this issue 3 months ago • 2 comments

I think it'd be beneficial for both the doc writer and consumer to be able to tell the version of the doc directly from the web page.

st0012 avatar Nov 26 '25 15:11 st0012

Hi! I'm interested in this issue (as my first contribution to rdoc). If possible, I am considering making a contribution. Is it the Git hash that should be displayed in the footer?

t-mangoe avatar Dec 12 '25 14:12 t-mangoe

Yes. So to properly support this feature, RDoc needs to:

  • Check if the project uses git
    • If not, don't display that section at all
  • Use a safe way to fetch the current commit sha
    • We may also want to consider other info, like branch/tag name when applicable, and perhaps date too?

st0012 avatar Dec 13 '25 23:12 st0012

@st0012 Thank you for your comment! I'm considering using the “git” gem to fetch the current commit sha. In this way, we can check if the project uses git, and we may get other git information. Adding a gem might be a concern... What do you think?

t-mangoe avatar Dec 20 '25 00:12 t-mangoe