Skip to content
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

Document how to embed code in the docs #1988

Open
mdelapenya opened this issue Dec 8, 2023 · 0 comments
Open

Document how to embed code in the docs #1988

mdelapenya opened this issue Dec 8, 2023 · 0 comments
Assignees
Labels
documentation Docs, docs, docs.

Comments

@mdelapenya
Copy link
Collaborator

Instead of pasting code snippets, we usually embed code blocks with the <!--codeinclude--> block, which allows to have the docs in sync with the code.

It basically needs:

  1. in the markdown:
<!--codeinclude-->
[Tab text](../path/to/file.extension) inside_block:name_of_the_block
<!--/codeinclude-->
  1. in the file.extension
// name_of_the_block {
... code snippet to be rendered in the markdown
// }

Originally posted by @mdelapenya in #1970 (comment)

@mdelapenya mdelapenya added the documentation Docs, docs, docs. label Dec 8, 2023
@mdelapenya mdelapenya self-assigned this Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Docs, docs, docs.
Projects
None yet
Development

No branches or pull requests

1 participant