documentation: Consider adding reference to relevant code samples in the Doxygen documentation #60647
Labels
area: Documentation Infrastructure
area: Documentation
Enhancement
Changes/Updates/Additions to existing features
Is your enhancement proposal related to a problem? Please describe.
When browsing the API documentation (or also the source code directly, frankly), it would be nice to have references to existing code samples that are relevant to such or such API, to be able to directly jump to working code that shows the API in action.
Describe the solution you'd like
Not sure about the cleanest way to implement it, but thinking a Doxygen ALIAS could do the trick.
Maybe something along the lines of:
Which could be used as follows:
@zephyrsample{net/mqtt_sn_publisher, MQTT-SN Client Sample}
. Two not necessarily ideal things there are:Not sure an
xrefitem
is needed FWIW, it just that it gave me a quick&dirty way to test things out, and also automatically provides grouping of several occurences ofzephyrsample
into the same "Relevant Code Samples" header.Note: if needed we could have the ALIAS have a different output for HTML (Doxygen HTML documentation) and XML (doc has pulled by Sphinx/Docleaf for being embedded in the main documentation).
Describe alternatives you've considered
N/A
Additional context
This feedback/RFE has been brought up by several people in the Zephyr documentation survey that was recently conducted.
Related: At some point we will probably want at doing the opposite as well, i..e make sure that .rst documentation for code samples clearly calls out which API/subsystem/whatever it is a sample for, and systematically cross-reference the couple of relevant Doxygen or Sphinx doc pages.
cc @gmarull
The text was updated successfully, but these errors were encountered: