jekyll-ultraviolet 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/jekyll-ultraviolet.gemspec +16 -0
- data/lib/jekyll/ultraviolet/version.rb +5 -0
- data/lib/jekyll/ultraviolet.rb +33 -0
- metadata +51 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/jekyll/ultraviolet/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Matte Noble"]
|
6
|
+
gem.email = ["me@mattenoble.com"]
|
7
|
+
gem.description = %q{Ultraviolet syntax highlighting in Jekyll}
|
8
|
+
gem.summary = %q{Ultraviolet syntax highlighting in Jekyll}
|
9
|
+
|
10
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
11
|
+
gem.files = `git ls-files`.split("\n")
|
12
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
13
|
+
gem.name = "jekyll-ultraviolet"
|
14
|
+
gem.require_paths = ["lib"]
|
15
|
+
gem.version = Jekyll::Ultraviolet::VERSION
|
16
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'uv'
|
2
|
+
|
3
|
+
module Jekyll
|
4
|
+
module Ultraviolet
|
5
|
+
class << self; attr_accessor :theme; end
|
6
|
+
|
7
|
+
def self.initialize
|
8
|
+
@theme = "twilight"
|
9
|
+
end
|
10
|
+
|
11
|
+
class Block < Liquid::Block
|
12
|
+
include Liquid::StandardFilters
|
13
|
+
|
14
|
+
def initialize(tag, lang, tokens)
|
15
|
+
super
|
16
|
+
@lang = (lang.strip unless lang.empty?) || "ruby"
|
17
|
+
end
|
18
|
+
|
19
|
+
def render(context)
|
20
|
+
output = []
|
21
|
+
output << context["pygments_prefix"]
|
22
|
+
output << Uv.parse(super.join, "xhtml", @lang, false, Ultraviolet.theme)
|
23
|
+
output << context["pygments_suffix"]
|
24
|
+
output.join
|
25
|
+
rescue LoadError
|
26
|
+
raise "Ultraviolet not installed."
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
Liquid::Template.register_tag('uv', Jekyll::Ultraviolet::Block)
|
33
|
+
|
metadata
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-ultraviolet
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Matte Noble
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-08-20 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description: Ultraviolet syntax highlighting in Jekyll
|
15
|
+
email:
|
16
|
+
- me@mattenoble.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- Gemfile
|
23
|
+
- Rakefile
|
24
|
+
- jekyll-ultraviolet.gemspec
|
25
|
+
- lib/jekyll/ultraviolet.rb
|
26
|
+
- lib/jekyll/ultraviolet/version.rb
|
27
|
+
homepage:
|
28
|
+
licenses: []
|
29
|
+
post_install_message:
|
30
|
+
rdoc_options: []
|
31
|
+
require_paths:
|
32
|
+
- lib
|
33
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
requirements: []
|
46
|
+
rubyforge_project:
|
47
|
+
rubygems_version: 1.8.6
|
48
|
+
signing_key:
|
49
|
+
specification_version: 3
|
50
|
+
summary: Ultraviolet syntax highlighting in Jekyll
|
51
|
+
test_files: []
|