diff options
Diffstat (limited to '.themes/classic/plugins/include_code.rb')
-rw-r--r-- | .themes/classic/plugins/include_code.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.themes/classic/plugins/include_code.rb b/.themes/classic/plugins/include_code.rb index 905cee52..b063f14f 100644 --- a/.themes/classic/plugins/include_code.rb +++ b/.themes/classic/plugins/include_code.rb @@ -1,3 +1,18 @@ +# Title: Include Code Tag for Jekyll +# Author: Brandon Mathis http://brandonmathis.com +# Description: Import files on your filesystem into any blog post as embedded code snippets with syntax highlighting and a download link. +# Configuration: You can set default import path in _config.yml (defaults to code_dir: downloads/code) +# +# Syntax {% include_code path/to/file %} +# +# Example: +# {% include_code javascripts/test.js %} +# +# This will import test.js from source/downloads/code/javascripts/test.js +# and output the contents in a syntax highlighted code block inside a figure, +# with a figcaption listing the file name and download link +# + require 'pathname' module Jekyll |