This project is not covered by Drupal’s security advisory policy.
This module allows content creators to embed code snippets from github repositories by using github_embed token inside the text editor.
Configuration
Go to: Configuration > Content authoring > Text formats and editors or admin page "admin/config/content/formats".
Enable "Github embed" filter for your desired format and configure the Github filter
settings (base URL, username, repository).
Tokens
There are two token variants available:
1. [github_embed:BRANCH-NAME/FILENAME]
This token uses default repository settings set by filter, so you only need to
specify branch name and a file name.
E.g.: [github_embed:master/src/Plugin/Block/MyContentBlock.php]
2. [github_embed:file:FULL-FILEPATH]
In this case we need to explicitly specify full repository details in the file
path (username, repository name, branch and file name).
E.g.: [github_embed:file:my-username/my-repository-name/master/src/MyCode.php]
Project information
- Project categories: Content editing experience
- Ecosystem: GitHub, Code Filter, Token, GitHub Connect, Github Widget
- Created by borutpiletic on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.



