jekyll-mentions 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/jekyll-mentions.rb +21 -0
- metadata +72 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: dae34d0f1ed4c4a95712d9a0d4f2d0387b857149
|
4
|
+
data.tar.gz: 0cae49e6a61c9a0560a4086eea15a224ca65ba69
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fc010195fb5bb886eb2bb6e5630f44fb4d4603fa6ecdda29041a52154d890158663f5f9f4139e8b5747841a5afd437ca4e4369f29d6d77e2f28d7bc93ca783b4
|
7
|
+
data.tar.gz: 6453fd07b6fd6a9839f4fc70f72cafdcb91f2899603878711fd44861eb37ec37f55cce9f68b347b78b63505b26577108d35949773f230b74ecb143d1086a450c
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'jekyll'
|
2
|
+
require 'html/pipeline'
|
3
|
+
|
4
|
+
module Jekyll
|
5
|
+
class Mentions < Jekyll::Generator
|
6
|
+
|
7
|
+
TAG = "jekyll_mentions"
|
8
|
+
URL = "https://github.com"
|
9
|
+
|
10
|
+
def generate(site)
|
11
|
+
site.pages.each { |page| mentionify page }
|
12
|
+
site.posts.each { |page| mentionify page }
|
13
|
+
end
|
14
|
+
|
15
|
+
def mentionify(page)
|
16
|
+
filter = HTML::Pipeline::MentionFilter.new("<#{TAG}>#{page.content}</#{TAG}>", { :base_url => URL })
|
17
|
+
page.content = filter.call.search(TAG).children.to_s
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-mentions
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- GitHub, Inc.
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-01-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: html-pipeline
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: ''
|
42
|
+
email: support@github.com
|
43
|
+
executables: []
|
44
|
+
extensions: []
|
45
|
+
extra_rdoc_files: []
|
46
|
+
files:
|
47
|
+
- lib/jekyll-mentions.rb
|
48
|
+
homepage: https://github.com/github/jemoji
|
49
|
+
licenses:
|
50
|
+
- MIT
|
51
|
+
metadata: {}
|
52
|
+
post_install_message:
|
53
|
+
rdoc_options: []
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
requirements: []
|
67
|
+
rubyforge_project:
|
68
|
+
rubygems_version: 2.2.0
|
69
|
+
signing_key:
|
70
|
+
specification_version: 4
|
71
|
+
summary: "@mentionable support for your Jekyll site"
|
72
|
+
test_files: []
|