https://github.com/backdrop-contrib/gist_filter
Adds a filter to embed Gists from GitHub anywhere in the text on your Backdrop CMS site.
https://github.com/backdrop-contrib/gist_filter
backdrop backdropcms cms filter gist gists gists-files github input-filter
Last synced: 7 months ago
JSON representation
Adds a filter to embed Gists from GitHub anywhere in the text on your Backdrop CMS site.
- Host: GitHub
- URL: https://github.com/backdrop-contrib/gist_filter
- Owner: backdrop-contrib
- License: gpl-2.0
- Created: 2023-07-05T08:47:47.000Z (over 2 years ago)
- Default Branch: 1.x-2.x
- Last Pushed: 2024-07-27T18:54:54.000Z (over 1 year ago)
- Last Synced: 2025-02-10T13:18:47.025Z (11 months ago)
- Topics: backdrop, backdropcms, cms, filter, gist, gists, gists-files, github, input-filter
- Homepage: https://backdropcms.org/project/gist_filter
- Size: 34.2 KB
- Stars: 1
- Watchers: 9
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Gist Filter
========
Gist Filter allows gists from Github to be embedded anywhere in the text using
a token format to embed as either a link, a 'code' block or embedded using one
of a range of themes.
Installation
------------
- Install this module using the official Backdrop CMS instructions at
https://docs.backdropcms.org/documentation/extend-with-modules.
- Enable the Gist Filter in each text format where you want to use it.
- In the order of filters (weight) within each text format you use it, Gist
Filter must come BEFORE
[Token Filter](https://backdropcms.org/project/token_filter) and AFTER 'Limit
allowed HTML tags'. The module will attempt to set this but double check this
if you run into problems.
Usage
-------------
1. From the text format configuration page, you can configure the default
display method for each text format.
2. Within text using a filtered format where the filter is enabled, use the
following patterns:
- `[gist:123abc456def7890]` - use the default display method.
- `[gistcode:123abc456def7890]` - embed the gist within `` blocks.
- `[gistlink:123abc456def7890]` - embed the gist as a link.
- `[gistembed:123abc456def7890]` - embed the gist using a script.
The gist ID is the string after the gist owner. For the examples above the gist
URL might be `https://gist.github.com/yorkshire-pudding/123abc456def7890`.
3. To add a specific file use `[gist:123abc456def7890:myfile.sh]` or the
equivalent with a `gistcode`, `gistlink` or `gistembed` prefix.
4. Go to `/admin/config/content/gist-filter` where you can select a theme for
the embed display (you will need to clear the page cache to apply a change
here), and also add a GitHub Personal Access token to give your site a higher
limit for retrieving gists.
5. The GitHub Personal Access token, if used, is stored in config. Do not use
this if your config is stored in a public repository.
6. Clearing the 'Page and else' cache may be necessary to see the effects of a
change.
For further information, please visit the [Wiki](https://github.com/backdrop-contrib/gist_filter/wiki).
Issues
------
Bugs and Feature Requests should be reported in the Issue Queue:
https://github.com/backdrop-contrib/gist_filter/issues.
Current Maintainers
-------------------
- [Martin Price](https://github.com/yorkshire-pudding) - [System Horizons](https://www.systemhorizons.co.uk)
- Collaboration and co-maintainers welcome!
Credits
-------
- Ported to Backdrop CMS by - [Martin Price](https://github.com/yorkshire-pudding) - [System Horizons](https://www.systemhorizons.co.uk).
- Port sponsored by [System Horizons](https://www.systemhorizons.co.uk).
- Originally written for Drupal by [Jake Bell](https://www.drupal.org/u/theunraveler)
- Incorporating several patches by various authors from the Drupal issue queue.
- Gist Embed themes by [Will Boyd](https://github.com/lonekorean)
License
-------
This project is GPL v2 software.
See the LICENSE.txt file in this directory for complete text.