jekyll_draft 3.0.0 → 3.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/CHANGELOG.md +1 -1
- data/README.md +4 -1
- data/lib/jekyll_draft/version.rb +1 -1
- data/spec/jekyll/draft_spec.rb +2 -1
- data/spec/jekyll/mocks.rb +2 -1
- data/spec/status_persistence.txt +1 -1
- metadata +3 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d19e46e62c8e1d7cf29a6337023ea875a6497040f773c2b416f9798488820199
|
4
|
+
data.tar.gz: c4e3f0ae938781b77a267b3681640234c15dffa3349cf966fff74836bbe4234e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b192fb472d77c23932160650cdfe68eacfb1f52b1ccf9d0f84c6e19642e4471eeb82d3ffcba920dc3e1ae6d5ba42a04ae8372361b873bae6386521c96eacab2f
|
7
|
+
data.tar.gz: b7e2bfbdd778dfe7dd89846c7c7fb0d57fdb1b7d6a1c2688278c32cf9f17edaf28707749fdb90b7698820ae713f3900afb0e93d4fce41c4fea2ff4d433515b51
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,6 +5,9 @@ visible when the website is published in `production` mode.
|
|
5
5
|
The Jekyll documentation is scattered and incomplete regarding detecting draft pages and documents.
|
6
6
|
This plugin provides standard ways for detecting draft pages and documents.
|
7
7
|
|
8
|
+
You can display the Jekyll mode that was active when a page was
|
9
|
+
generated with `{{jekyll.environment}}`.
|
10
|
+
|
8
11
|
`Jekyll_draft` provides the following:
|
9
12
|
|
10
13
|
* Jekyll block tags: `if_draft`, `if_page_draft`, `unless_draft`, and `unless_page_draft`.
|
@@ -312,7 +315,7 @@ Here is an example of embedding the `draft_html` inline tag into an HTML documen
|
|
312
315
|
```
|
313
316
|
|
314
317
|
By default, if the document is a draft, and the Jekyll website generation was performed in development mode,
|
315
|
-
`draft_html` emits ` <i class='jekyll_draft>Draft</i>`,
|
318
|
+
`draft_html` emits ` <i class='jekyll_draft'>Draft</i>`,
|
316
319
|
otherwise it does not emit anything.
|
317
320
|
|
318
321
|
<p>You can change this behavior in several ways:</p>
|
data/lib/jekyll_draft/version.rb
CHANGED
data/spec/jekyll/draft_spec.rb
CHANGED
@@ -11,7 +11,8 @@ RSpec.describe(Jekyll::Draft) do
|
|
11
11
|
PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config)
|
12
12
|
end
|
13
13
|
|
14
|
-
let(:
|
14
|
+
let(:parse_context_published) { TestParseContext.new(published: true) }
|
15
|
+
let(:parse_context_draft) { TestParseContext.new(published: false) }
|
15
16
|
|
16
17
|
it 'detects drafts' do
|
17
18
|
# expect(result).to match_ignoring_whitespace <<-END_RESULT
|
data/spec/jekyll/mocks.rb
CHANGED
@@ -23,7 +23,7 @@ end
|
|
23
23
|
|
24
24
|
# Mock for Liquid::Context
|
25
25
|
class TestLiquidContext < Liquid::Context
|
26
|
-
def initialize
|
26
|
+
def initialize(published: false)
|
27
27
|
super
|
28
28
|
|
29
29
|
page = {
|
@@ -35,6 +35,7 @@ class TestLiquidContext < Liquid::Context
|
|
35
35
|
"layout" => "default",
|
36
36
|
"name" => "index.html",
|
37
37
|
"path" => "index.html",
|
38
|
+
"published" => published,
|
38
39
|
"title" => "Welcome",
|
39
40
|
"url" => "/",
|
40
41
|
}
|
data/spec/status_persistence.txt
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_draft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Slinn
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: jekyll
|
@@ -108,8 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
107
|
- !ruby/object:Gem::Version
|
109
108
|
version: '0'
|
110
109
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
112
|
-
signing_key:
|
110
|
+
rubygems_version: 3.7.1
|
113
111
|
specification_version: 4
|
114
112
|
summary: This Jekyll filter detects draft documents.
|
115
113
|
test_files:
|