jekyll-scalafiddle 1.0.0 → 1.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 +4 -4
- data/README.md +17 -9
- data/jekyll-scalafiddle.gemspec +1 -1
- data/lib/jekyll-scalafiddle.rb +3 -2
- data/lib/jekyll-scalafiddle/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19ed0f5245bcf5f75673d630415bbe73e15d26e5
|
4
|
+
data.tar.gz: ab771049223f50d76e9f86ca06f3687bae889b45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d46d1832001360c75b51d4da9fe6828f31300a287fd3f620482c6925e53bbe013df0c97859789190a28e351fa3e58399b011f38bbf2739f3808bf3aca48a598a
|
7
|
+
data.tar.gz: 0b668d15c354477a3d9c078d057fdfb8de39f6f889571919b3cd5eb9869d35bc297f88f1b3dd7ce102b67e98ae7e4a8ad314b508dab23ab1a03d936e1b1624d3
|
data/README.md
CHANGED
@@ -17,6 +17,19 @@ plugins:
|
|
17
17
|
- jekyll-scalafiddle
|
18
18
|
```
|
19
19
|
|
20
|
+
### Installation for sbt-microsites
|
21
|
+
|
22
|
+
[sbt-microsites](https://47deg.github.io/sbt-microsites/) is a plugin for sbt that helps Scala developers build and publish
|
23
|
+
documentation for their project. It's based on Jekyll, so you can use this same plugin. Unlike regular Jekyll, you cannot use
|
24
|
+
`gem` to install the plugin, but you must manually copy the `jekyll-scalafiddle.rb` file under a `plugins` directory in your
|
25
|
+
microsite project.
|
26
|
+
|
27
|
+
```bash
|
28
|
+
$ mkdir plugins
|
29
|
+
$ cd plugins
|
30
|
+
$ curl -o jekyll-scalafiddle.rb https://raw.githubusercontent.com/scalafiddle/scalafiddle-core/master/integrations/jekyll/lib/jekyll-scalafiddle.rb
|
31
|
+
```
|
32
|
+
|
20
33
|
## Usage
|
21
34
|
|
22
35
|
The ScalaFiddle plugin provides a tag `scalafiddle` which you can use to convert a code block in your documentation into an
|
@@ -116,20 +129,15 @@ to your library.
|
|
116
129
|
You can also configure the location of templates with `templateDir` and the URL for the ScalaFiddle service (if you want to
|
117
130
|
run your own ScalaFiddle server, for example locally) using `scalaFiddleUrl`.
|
118
131
|
|
119
|
-
|
120
|
-
|
121
|
-
[sbt-microsites](https://47deg.github.io/sbt-microsites/) is a plugin for sbt that helps Scala developers build and publish
|
122
|
-
documentation for their project. It's based on Jekyll, so you can use this same plugin. Unlike regular Jekyll, you cannot use
|
123
|
-
`gem` to install the plugin, but you must manually copy the `jekyll-scalafiddle.rb` file under a `plugins` directory in your
|
124
|
-
microsite project.
|
132
|
+
### Configuration with sbt-microsites
|
125
133
|
|
126
|
-
To configure ScalaFiddle plugin, use the `micrositeConfigYaml` option in your project definition. For example:
|
134
|
+
To configure the ScalaFiddle plugin, use the `micrositeConfigYaml` option in your project definition. For example:
|
127
135
|
|
128
136
|
```scala
|
129
137
|
micrositeConfigYaml := ConfigYml(yamlInline =
|
130
138
|
"""
|
131
139
|
|scalafiddle:
|
132
|
-
| url: http://localhost:8880/
|
133
140
|
| dependency: io.circe %%% circe-core % 0.8.0,io.circe %%% circe-generic % 0.8.0,io.circe %%% circe-parser % 0.8.0
|
134
|
-
|
141
|
+
| scalaFiddleUrl: http://localhost:8880/
|
142
|
+
""".stripMargin)
|
135
143
|
```
|
data/jekyll-scalafiddle.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.authors = ["Otto Chrons"]
|
11
11
|
spec.email = ["otto@chrons.me"]
|
12
12
|
|
13
|
-
spec.homepage = "https://github.com/scalafiddle/scalafiddle-core/integrations/jekyll"
|
13
|
+
spec.homepage = "https://github.com/scalafiddle/scalafiddle-core/tree/master/integrations/jekyll"
|
14
14
|
spec.licenses = ["Apache-2.0"]
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|spec|features)/!) }
|
16
16
|
spec.require_paths = ["lib"]
|
data/lib/jekyll-scalafiddle.rb
CHANGED
@@ -47,8 +47,9 @@ module Jekyll
|
|
47
47
|
|
48
48
|
def render(context)
|
49
49
|
site = context.registers[:site]
|
50
|
-
|
51
|
-
|
50
|
+
# run all markdown converters for this content
|
51
|
+
converters = site.converters.select { |c| c.matches(".md") }.sort
|
52
|
+
content = converters.reduce(super(context)) { |content, converter| converter.convert(content) }
|
52
53
|
config = site.config.fetch("scalafiddle", {})
|
53
54
|
result = <<HTML
|
54
55
|
<div #{render_attributes(config)}>#{content}</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-scalafiddle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Otto Chrons
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -87,7 +87,7 @@ files:
|
|
87
87
|
- lib/jekyll-scalafiddle/version.rb
|
88
88
|
- script/bootstrap
|
89
89
|
- script/cibuild
|
90
|
-
homepage: https://github.com/scalafiddle/scalafiddle-core/integrations/jekyll
|
90
|
+
homepage: https://github.com/scalafiddle/scalafiddle-core/tree/master/integrations/jekyll
|
91
91
|
licenses:
|
92
92
|
- Apache-2.0
|
93
93
|
metadata: {}
|