Replies: 4 comments
-
It's certainly possible to generate pages per method. YARD server already exposes individual method pages via permalink (example) and it should in fact be fully supported by the defaulte template already (breadcrumbs and all). The biggest limitation is that the yardoc CLI tool specifically omits method when generating: https://github.com/lsegal/yard/blob/main/lib/yard/cli/yardoc.rb#L325-L358 The good news is this is very possible to customize by either having your plugin/extension manually generate said method objects (using the same methodology as #run_generate above), or by overriding the related Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
As far as language settings go, this might be a little tougher. YARD doesn't make any assumptions about the code's language format, and arguably it would be incorrect to assume Link underlining etc would be acceptable as a PR (please include screenshots of what is being changed) but a change to lang etc would probably require some general purpose way to customize the language (without requiring code) if we were to default to English. |
Beta Was this translation helpful? Give feedback.
-
Yep, I figured as much. I think it would make sense for a language method in setup.rb that defaults to nil, and when overridden, will set lang=whatever when the language is set.
I will investigate and get back to this!
The color changing I think is straight forward. The link underlining, TBH, is ugly (see current S3 docs, it's every link pretty much), but I think some exceptions can be made to ignore summary signatures and some other areas. |
Beta Was this translation helpful? Give feedback.
-
I wasn't able to get method to generate when overwriting all_objects. I may have to dig into internals. Any other advice? I created a rake task similar to the yardoc executable with a monkey patch like so:
Edit - I see the files are there, however, with no breadcrumb and styling! |
Beta Was this translation helpful? Give feedback.
-
Hello Loren. We (AWS Ruby SDK) are needing to address some accessibility concerns with our docs. Our Client docs (i.e. s3) have many methods. We are investigating whether it's possible to have each method on a single page, and have it breadcrumbed under the Client's CodeObject. If this is possible, what is the best way to achieve this?
Also - we've had to make some minor changes to colors, link underlining, setting page language "en", etc. I am also wondering if any of these changes can be merged upstream or if any of them are considered breaking? https://github.com/aws/aws-sdk-ruby/pull/2861/files
Thanks
Beta Was this translation helpful? Give feedback.
All reactions