bridgetown-haml 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +0 -1
- data/README.md +4 -2
- data/bridgetown-haml.gemspec +1 -1
- data/lib/bridgetown-haml/haml_templates.rb +10 -0
- data/lib/bridgetown-haml/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b447e6fdc5ca2638ad2d3515ef58c3d4dbcf3568e6e60e5a46247ad3cfaefd9e
|
4
|
+
data.tar.gz: 37da206046e473f9747ab2b1747ca428cc02bb5eae79ae64df7ab37079d115c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf084f41dd21a87ae0450953d438c4423e429826efbdc7aae66a06d2a2567499dbb7d3783eca731c887d202e61fe58f003cc0c94d0141da4b9d8e1c09efdb6b1
|
7
|
+
data.tar.gz: '0973467470eb2d733bba581e03bc63f748bb0a91caf1d6fb1f4f0bd8ee12ed481f83db55d1b4e4325fc92d365b31232a939cba684647741011b3f09845c118aa'
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
A Bridgetown plugin to provide support for [Haml templates](http://haml.info/).
|
4
4
|
|
5
|
-
_Requires Bridgetown 0.
|
5
|
+
_Requires Bridgetown 0.18 or greater._
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -14,7 +14,9 @@ $ bundle add bridgetown-haml -g bridgetown_plugins
|
|
14
14
|
|
15
15
|
## Usage
|
16
16
|
|
17
|
-
Simply name your page, layout, or partial with a `.haml` extension. The available features will be fairly analogous to [the ERB support](https://
|
17
|
+
Simply name your page, layout, or partial with a `.haml` extension. The available features will be fairly analogous to [the ERB support](https://www.bridgetownrb.com/docs/erb-and-beyond#haml-and-slim) in Bridgetown, including support for helpers, partials, and rendering Liquid components. You can even [embed Markdown and other template languages](https://github.com/haml/haml/blob/master/REFERENCE.md#filters-filters) using standard Haml syntax.
|
18
|
+
|
19
|
+
You can also add `template_engine: haml` to your file's front matter and use any extension you want. For example, you could add `data.xml` to your source folder and simply make sure the front matter contains `template_engine: haml`.
|
18
20
|
|
19
21
|
## Testing
|
20
22
|
|
data/bridgetown-haml.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
spec.required_ruby_version = ">= 2.5.0"
|
19
19
|
|
20
|
-
spec.add_dependency "bridgetown", ">= 0.
|
20
|
+
spec.add_dependency "bridgetown", ">= 0.18", "< 2.0"
|
21
21
|
spec.add_dependency "haml", ">= 5.1.2"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler"
|
@@ -41,6 +41,16 @@ module Bridgetown
|
|
41
41
|
haml_renderer.render(haml_view)
|
42
42
|
end
|
43
43
|
end
|
44
|
+
|
45
|
+
def matches(ext, convertible)
|
46
|
+
return true if convertible.data[:template_engine] == "haml"
|
47
|
+
|
48
|
+
super(ext)
|
49
|
+
end
|
50
|
+
|
51
|
+
def output_ext(ext)
|
52
|
+
ext == ".haml" ? ".html" : ext
|
53
|
+
end
|
44
54
|
end
|
45
55
|
end
|
46
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-haml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bridgetown
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: '0.18'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '2.0'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: '0.18'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2.0'
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
154
|
+
rubygems_version: 3.1.4
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: A Bridgetown plugin which provides support for Haml templates.
|