Embed Code from an External Source
You can set your help content to use the latest code samples from a repository, such as GitHub or BitBucket. Once set up, your HTML5 help will be able to update code samples automatically, without being republished.
Note
The code samples need to be in an "https" URL.
Tip
For embedding Swagger/Open API code, see Embed Swagger OpenAPI.
Use dynamic code snippets to have your HTML5 output to use "live" code snippets from a repository.
Select Enable for Output 'role' attribute as class names.

Select the position where you want the code to appear.
Add a code block element, either
programlistingorscreen.Select the
programlistingorscreenelement in the topic.Tip
You can add a
programlistingelement with these attributes added by the shortcut Alt,. Then you just need to add the URL value.Add these attributes and values In the Element Attributes Panel:
roleattribute with the valueembedcodexlink:hrefattribute with the URL to the code snippet in your repository.
Optional: If you want or need fallback code for other output formats, add the code snippet in the
programlistingorscreenelement as well.
When you publish, your code will be fetched from the repository and will be automatically updated if that code changes.
Note
If you also publish to other outputs such as PDF, the embedded code will still be fetched dynamically at publish time. But if you change the code samples in your repository, you will need to republish the PDF output to have Paligo fetch the latest changes.




