GitHub Code
You can easily embed code directly from a GitHub repository into DeveloperHub. This functionality ensures that the code in your documentation remains synchronized with any modifications made in the repository.
To create GitHub Code block:
Type /
Select GitHub Code .
Paste in the box the URL of the GitHub file, for example:
https://github.com/torvalds/linux/blob/master/kernel/signal.c.
You can also only embed a few lines by selecting the lines on GitHub, such a URL would show: https://github.com/torvalds/linux/blob/master/kernel/signal.c#L15-L29.
The file selected will be rendered as:
Markdown if the file name ends in
.md.Jupyter notebook if the file name ends in
.ipynb.Raw file otherwise.
Embedding is powered by https://emgithub.com/. You can change the code theme using advanced settings by modifying code.githubTheme.
Example GitHub Code
Source: https://github.com/torvalds/linux/blob/master/kernel/signal.c#L152-L170.
429 Failed to download https://raw.githubusercontent.com/torvalds/linux/master/kernel/signal.c