-
Notifications
You must be signed in to change notification settings - Fork 41
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
Out of line documentation and examples? #88
Comments
Yes- this is one of the main features of Hyde. The tool is a C++ compiler that produces documentation (instead of an executable). This documentation takes the form of dozens of Markdown-based files (with YAML front-matter). The files live externally to the source code, but are kept in sync with the source code by successive runs of Hyde. Developers can add more documentation to the files Hyde maintains, and the tool will preserve that documentation as well. |
As far as examples, here is a sample website built with the documentation Hyde produces (using this build script) from the example files in the Hyde repo. |
@fosterbrereton all those files have the documentation inline, in the code, though. Perhaps we have different understandings what "separate from the code" means here? |
hyde 2.0 supports a hybrid model where docs can be pulled from comments in
the code as well as added to in the generated .md files (which hyde can
update). For example, in this file:
https://raw.githubusercontent.com/stlab/libraries/main/docs/includes/stlab/algorithm/reverse.hpp/f_reverse_append.md
The `inline: description:` is pulled from the source. But the `description:
"`I` is a model of `forward_node_iterator`.\n"` only exists in the .md
file. The resulting docs are here:
https://stlab.cc/includes/stlab/algorithm/reverse.hpp/f_reverse_append.html
You can also add whatever long-form description you want to the markdown
file, and it will be preserved/updated by Hyde. Initially in stlab we had
all docs only in Hyde (none in the sources) but we are moving towards
keeping the brief descriptions in the sources. We just went through a major
restructuring of both code and docs and now most of the docs are just the
Hyde generated ones while I'm putting the pieces back together.
The stlab site is using the adobe/hyde-theme directly.
…On Thu, Jul 11, 2024 at 3:17 PM jaskij ***@***.***> wrote:
@fosterbrereton <https://github.com/fosterbrereton> all those files have
the documentation inline, in the code, though.
Perhaps we have different understandings what "separate from the code"
means here?
—
Reply to this email directly, view it on GitHub
<#88 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARMSLE4PTUL5FDMXSU6KKLZL4AANAVCNFSM6AAAAABKW4DTSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRUGA2DENBUGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thank you @sean-parent , this is exactly the kind of example I was looking for. Knowing what to look for, I was also able to find The one question I still have is how do those paths and file names work together. Probably something I'd be able to figure out once I get around to actually testing hyde. Leaving this issue open because does not seem to be documented in hyde itself. |
To quote
README.md
:If I am understanding this correctly, it is possible to have documentation source in a file separate from the code? This feature does not seem to documented in any way, and I also couldn't find any examples.
The text was updated successfully, but these errors were encountered: