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

Provide the example's source code in the documentation #2

Open
luisfabib opened this issue Apr 27, 2022 · 1 comment
Open

Provide the example's source code in the documentation #2

luisfabib opened this issue Apr 27, 2022 · 1 comment

Comments

@luisfabib
Copy link

Currently, there are examples provided in the documentation (e.g. see here), but the corresponding pages point out a file in one of the provided distributions (demo_MMMx.zip) and then proceed to discuss that example.

The source code of the example's file (.mcx) should be provided in the documentation. Sphinx easily allows to include a source code file as a literal code block:

.. literalinclude :: <path/to/file>
   :language: <file_language>

This will include the full example source code in the example's documentation without the need of any code duplication and zero maintenance effort.

@luisfabib
Copy link
Author

This would also allow the inclusion of the examples with the source code and the executable users to just get them from the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant