Coder Social home page Coder Social logo

redmine_gist's Introduction

Gist Embed Redmine Plugin

Redmine plugin adding a {{gist}} macro that embeds Github Gists into Redmine.

Usage

Redmine plugin adding a {{gist}} macro that embeds Github Gists into Redmine.

To embed the public gist https://gist.github.com/4033291 : {{gist(4033291)}}

You can embed a specific file from a gist: {{gist(4033291,README.md)}}

Private gists work too: {{gist(28c72d38da181f38bbb9)}}

You can also just paste in the gist URL: {{gist(https://gist.github.com/4033291)}}

Be careful about using the URL syntax when embedding specific files. If the filename has any capital letters (eg "README.md"), the permalink gist generates will downcase the filename (eg "https://gist.github.com/4033291#file_readme.md"), preventing the plugin from extracting the original filename and breaking the embedding. Instead, provide the filename as second argument: {{gist(https://gist.github.com/4033291,README.md)}}

Installation

  1. cd PATH_TO_REDMINE/vendor/plugins
  2. git clone git://github.com/dergachev/redmine_gist.git gist
  3. (restart Redmine web server)

More info

Screenshot

If you'd like to have a wiki page documenting this plugin, see USAGE.textile.

Notes

Tested on Redmine 1.3, though hopefully compatible with future versions too.

License

This plugin is licensed under the GNU GPL v2. See LICENSE.txt for details.

redmine_gist's People

Contributors

dergachev avatar ykws avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redmine_gist's Issues

README.md is not rendered as markdown in embedded gists

Improve URL syntax for specific file

Currently the readme has a big warning about how the plugin can't reliably extract filenames from URLs such as https://gist.github.com/1353700#file_readme.md due to lowercasing, etc.

One idea for a workaround: use the gist API (now supports JSONP) to do the embedding manually. Or if not manually, then just to extract the original filename (inefficient!).
Here's an example:

https://gist.github.com/4033291.json (consider using http://jsonprettyprint.com/)
https://api.github.com/gists/4033291
https://api.github.com/gists/4033291/files

More info: http://stackoverflow.com/questions/4741520/how-can-i-embed-an-entire-github-gist-dynamically-on-a-page

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.