You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a timezone to the timestamp seems reasonable. Would accept a PR to fix this.
As far as git commit hash and library version, these aren't something that YARD necessarily knows about. Git commit would require integrating with the system VCS which has a lot of sharp edges (git isn't in the PATH, contents generated against dirty checkout so SHA isn't valid, VCS might not be git, YARD opens itself up to fielding feature requests for ). Getting the library version is even harder as there is no static way to get this information without evaluating code.
The good news is you can build a custom template footer pretty easily with all the information you want by throwing a file into <path/to>/default/layout/html/footer.erb with any contents (you can grab initial contents from YARD's footer.erb) and then running yard with yard doc -p path/to (path/to was the prefix you used above for the file location).
<!-- templates/default/layout/html/footer.erb --><divid="footer">
Generated <code>MY_LIBRARY</code><%= YARD::VERSION %><!-- insert your library's VERSION const here -->
(<%= `git rev-parse HEAD`.strip[0,6] %>) at <%= Time.now %>.
</div>
Rubydoc intentionally pulls information that yard alone does not have-- specifically the rubygems package release list or git repos. That's because rubydoc explicitly pulls from these sources. YARD only uses disk.
Currently when yard generates docs it attaches the following footer:
Which is not enough to understand which version of the source code was used:
Ideally all of that need to be present to understand if the doc is up to date or not.
Please add this information to footer.
The text was updated successfully, but these errors were encountered: