octopress-markdown-tag 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +13 -0
- data/LICENSE.txt +22 -0
- data/README.md +73 -0
- data/lib/octopress-markdown-tag.rb +36 -0
- data/lib/octopress-markdown-tag/version.rb +8 -0
- metadata +105 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 895949e34a6a426651a46c6ce7312324f0bf440f
|
4
|
+
data.tar.gz: 0254c2744e1faec399f1095ab7a4051e9456a7d5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b93a60b635e896a90d1fcb86284a4f42732ec79e82104e10fb2fb465d82dfbf3f7e22ee264b9d92efaf82d56b751b857106de1872b4bb7c447c6e1e8a8799f5e
|
7
|
+
data.tar.gz: f9dbc61e850626c907b78bb7cfc7cb21038911ae28340f42d4dee6fadb69a42539bee7e0a29b4aea4d1a2d6bf38c25b688c88c9ea0bd3e0402bf3a6aafe2f4aa
|
data/CHANGELOG.md
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Brandon Mathis
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
# Octopress Markdown Tag
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/octopress-markdown-tag.png)](http://badge.fury.io/rb/octopress-markdown-tag) [![Build Status](https://travis-ci.org/octopress/markdown-tag.png)](https://travis-ci.org/octopress/markdown-tag)
|
4
|
+
|
5
|
+
Why? Because you should be able to:
|
6
|
+
|
7
|
+
- Write markdown anywhere.
|
8
|
+
- Process `{% include %}` tags with markdown.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
If you're using bundler add this gem to your site's Gemfile in the `:jekyll_plugins` group:
|
13
|
+
|
14
|
+
group :jekyll_plugins do
|
15
|
+
gem 'octopress-markdown-tag'
|
16
|
+
end
|
17
|
+
|
18
|
+
Then install the gem with Bundler
|
19
|
+
|
20
|
+
$ bundle
|
21
|
+
|
22
|
+
Or install it manually:
|
23
|
+
|
24
|
+
$ gem install octopress-markdown-tag
|
25
|
+
|
26
|
+
Then add the gem to your Jekyll configuration.
|
27
|
+
|
28
|
+
gems:
|
29
|
+
- octopress-markdown-tag
|
30
|
+
|
31
|
+
## Usage
|
32
|
+
|
33
|
+
### Embed Markdown in HTML
|
34
|
+
|
35
|
+
Drop some markdown in your html, and it will render nicely
|
36
|
+
|
37
|
+
```html
|
38
|
+
<!-- Some random HTML file-->
|
39
|
+
<div>
|
40
|
+
{% markdown %}
|
41
|
+
|
42
|
+
## That's right folks!
|
43
|
+
|
44
|
+
Markdown in your `HTML`!
|
45
|
+
|
46
|
+
- Any template
|
47
|
+
- Any time
|
48
|
+
|
49
|
+
{% endmarkdown %}
|
50
|
+
</div>
|
51
|
+
```
|
52
|
+
|
53
|
+
### Convert included partials with markdown
|
54
|
+
|
55
|
+
Correctly render markdown files which are included in an HTML page.
|
56
|
+
|
57
|
+
```html
|
58
|
+
<!-- Another random HTML file-->
|
59
|
+
|
60
|
+
<div>
|
61
|
+
{% markdown %}{% include coolcat.md %}{% endmarkdown %}
|
62
|
+
</div>
|
63
|
+
```
|
64
|
+
|
65
|
+
That's pretty much it. Have fun!
|
66
|
+
|
67
|
+
## Contributing
|
68
|
+
|
69
|
+
1. Fork it (https://github.com/octopress/markdown-tag/fork)
|
70
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
71
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
72
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
73
|
+
5. Create new Pull Request
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Octopress
|
2
|
+
module Tags
|
3
|
+
module Markdown
|
4
|
+
class Tag < Liquid::Block
|
5
|
+
alias_method :render_block, :render
|
6
|
+
|
7
|
+
def initialize(tag_name, markup, tokens)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
# Uses the default Jekyll markdown parser to
|
12
|
+
# parse the contents of this block
|
13
|
+
#
|
14
|
+
def render(context)
|
15
|
+
site = context.registers[:site]
|
16
|
+
converter = site.getConverterImpl(::Jekyll::Converters::Markdown)
|
17
|
+
converter.convert(render_block(context))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
Liquid::Template.register_tag('markdown', Octopress::Tags::Markdown::Tag)
|
25
|
+
|
26
|
+
if defined? Octopress::Docs
|
27
|
+
Octopress::Docs.add({
|
28
|
+
name: "Octopress Markdown Tag",
|
29
|
+
gem: "octopress-markdown-tag",
|
30
|
+
version: Octopress::Tags::Markdown::VERSION,
|
31
|
+
description: "A framework for writing Jekyll sites ",
|
32
|
+
path: File.expand_path(File.join(File.dirname(__FILE__), "../")),
|
33
|
+
source_url: "https://github.com/octopress/markdown-tag"
|
34
|
+
})
|
35
|
+
end
|
36
|
+
|
metadata
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: octopress-markdown-tag
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Brandon Mathis
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: clash
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jekyll
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- brandon@imathis.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- CHANGELOG.md
|
77
|
+
- LICENSE.txt
|
78
|
+
- README.md
|
79
|
+
- lib/octopress-markdown-tag.rb
|
80
|
+
- lib/octopress-markdown-tag/version.rb
|
81
|
+
homepage: https://github.com/octopress/octopress-markdown-tag
|
82
|
+
licenses:
|
83
|
+
- MIT
|
84
|
+
metadata: {}
|
85
|
+
post_install_message:
|
86
|
+
rdoc_options: []
|
87
|
+
require_paths:
|
88
|
+
- lib
|
89
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
requirements: []
|
100
|
+
rubyforge_project:
|
101
|
+
rubygems_version: 2.2.2
|
102
|
+
signing_key:
|
103
|
+
specification_version: 4
|
104
|
+
summary: Write markdown anywhere on your Jekyll site.
|
105
|
+
test_files: []
|