Git Product home page Git Product logo

easy_gists.ee_addon's Introduction

Easy Gists EE Addon

An ExpressionEngine plugin to allow for embedding of Github Gists.

The API

This plugin allows you to control how the Gist is rendered in your page. The only required property is the Gist ID:

{exp:easy_gists id="245831"}

would result in the text content of the Gist found at https://gist.github.com/245831.js being printed into the document (all scripting would be removed).

This plugin has several optional parameters:

  • embed: accepts "yes" or "no" ("yes" by default) and determines whether the content should be embedded (as opposed to linked via script)

  • css: accepts "yes" or "no" ("yes" by default) and is used with embed="yes" to determine whether or not the CSS reference should be stripped from the embedded code (in case you either don't want to use the Gist CSS or you've used {exp:gist:css} in the head of your document)

  • file: is the string filename you want the Gist to use (assuming your Gist has multiple files)

    {exp:easy_gists id="245831" file="my.html"}
  • raw: accepts "yes" or "no" ("no" by default) and has the script load the raw code (as opposed to the parsed JavaScript contents) EE2 only

  • wrap_with: the elements you want to wrap around the raw code ("pre.ext,code" by default). Separate multiple elements by a comma. Use ".ext" to add a class equal to the file’s extension to a specific element. EE2 only

  • highlight: Highlight one or more lines (available in raw mode only). Individual lines should be separated by commas ("10,12"). Multiple lines can be higlighted by setting a start and end, separated by a hyphen ("10-12"). You can combine these. EE2 only

  • highlight_with: The markup you want to wrap the highlighted lines ("mark" by default). EE2 only

    {exp:easy_gists id="4622706" file="undoing-tables.scss" raw="yes" highlight="1-8,10"}

License

pi.easy_gists.php is distributed under the liberal MIT License.

easy_gists.ee_addon's People

Contributors

aarongustafson avatar

Stargazers

Ruslan Voroshchuk avatar  avatar Paulo Elias avatar Adrienne L. Travis avatar

Watchers

 avatar  avatar James Cloos avatar  avatar

Forkers

owlookit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.