bridgetown-slim 1.0.2 → 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/README.md +3 -1
- data/bridgetown-slim.gemspec +1 -1
- data/lib/bridgetown-slim/slim_templates.rb +10 -0
- data/lib/bridgetown-slim/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: d5dfa87c7f9faed246db9f0d1c30e16d28e0abc094efb4692dd1e6617b60db1b
|
4
|
+
data.tar.gz: feaf202a1792217bcffa1f65b034df582d3352e6168b86a584768618ae591536
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c44abe7a01ccfd23f2226391165b6f27f7946426df3bb721edc3b8e2ad7a5376a6f119e10e46b7ba6d7ce073dfbc475143f9b70433f5a6414bf95a438ff6af6
|
7
|
+
data.tar.gz: 3e5e9fb1b5984b6f63dc50b417edb5d51b35d8b88520edd95398030b7eac5f59100211f8064735f47a9df10dd6aae3ec480ceee88e1c27c0de3ade4bb05bd882
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -14,7 +14,9 @@ $ bundle add bridgetown-slim -g bridgetown_plugins
|
|
14
14
|
|
15
15
|
## Usage
|
16
16
|
|
17
|
-
Simply name your page, layout, or partial with a `.slim` extension. The available features will be fairly analogous to [the ERB support](https://
|
17
|
+
Simply name your page, layout, or partial with a `.slim` 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/slim-template/slim#embedded-engines-markdown-) using standard Slim syntax.
|
18
|
+
|
19
|
+
You can also add `template_engine: slim` 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: slim`.
|
18
20
|
|
19
21
|
## Testing
|
20
22
|
|
data/bridgetown-slim.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 "slim", ">= 4.1.0"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler"
|
@@ -41,6 +41,16 @@ module Bridgetown
|
|
41
41
|
slim_renderer.render(slim_view)
|
42
42
|
end
|
43
43
|
end
|
44
|
+
|
45
|
+
def matches(ext, convertible)
|
46
|
+
return true if convertible.data[:template_engine] == "slim"
|
47
|
+
|
48
|
+
super(ext)
|
49
|
+
end
|
50
|
+
|
51
|
+
def output_ext(ext)
|
52
|
+
ext == ".slim" ? ".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-slim
|
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 Slim templates.
|