bridgetown-sample-plugin 0.1.2 β†’ 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b602d6d1318af92f34c2121933c32a2bfbdc3718b58158d2b8516ee4d24d3e4
4
- data.tar.gz: c3c26f8cf8746113bcad35f2e7b04b6aab8827f5ee86157d9d9c5dfb6f6cf93f
3
+ metadata.gz: d8742fa3c08b871d7bc27c2a486f06d3c1f61a4116f455f709ed1f38df07d47d
4
+ data.tar.gz: '0067495fa78fe28d5065bbb3af32912712fdaf6a4563af1cc7390727f9900806'
5
5
  SHA512:
6
- metadata.gz: c5f1656d5a29751e2e4364001563efe93a2ffbb944741547a3a0eea7ce92d056b264190486406b4c968ce415272f6c2723b4cdcd20fb6264811d2b9e11ae5d14
7
- data.tar.gz: 6f40441ac2de099930bbb6f5d49b74d5dcdc0100e781c5477d03fdc05fb982a00e34f26ed0f83dd3771033fa9f94a1cb9a9d7648d15fb5cba8b31c4339a1d23f
6
+ metadata.gz: 04cecfdfc566d3c4573f1d8b2e977a8768df5129fc7c924337c3cb84f5a91617b41e7a6fe385fa1ae44332d8e115e1dae56ea71aeb0c745ffbbc36ae21040c96
7
+ data.tar.gz: 9f93a6681f56f69b8d2893580b53259d673bb1e336e5cf684db4a904e8e0b5074e155563e74095dbca40fe5ce84f1a65375924371a270ed0e5c5d92b65833646
data/.gitignore CHANGED
@@ -15,8 +15,24 @@
15
15
  mkmf.log
16
16
  *.gem
17
17
  Gemfile.lock
18
- spec/dest
19
18
  .bundle
19
+ .ruby-version
20
+
21
+ # Node
22
+ node_modules
23
+ .npm
24
+ .node_repl_history
25
+
26
+ # Yarn
27
+ yarn-error.log
28
+ yarn-debug.log*
29
+ .pnp/
30
+ .pnp.js
31
+
32
+ # Yarn Integrity file
33
+ .yarn-integrity
34
+
35
+ spec/dest
20
36
  .bridgetown-metadata
21
37
  .bridgetown-cache
22
- .ruby-version
38
+ .bridgetown-webpack
@@ -1,7 +1,7 @@
1
- require: rubocop-jekyll
1
+ require: rubocop-bridgetown
2
2
 
3
3
  inherit_gem:
4
- rubocop-jekyll: .rubocop.yml
4
+ rubocop-bridgetown: .rubocop.yml
5
5
 
6
6
  AllCops:
7
7
  TargetRubyVersion: 2.5
@@ -2,6 +2,6 @@
2
2
 
3
3
  * Use this file to keep track of plugin updates
4
4
 
5
- ## 0.1.0 / 2020-05-01
5
+ # 0.1.0 / 2020-05-01
6
6
 
7
7
  * First version
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Sample plugin for Bridgetown
2
2
 
3
- _NOTE: This isn't a real plugin! Copy this sample code and use it to create your own Ruby gem!_ πŸ˜ƒ
3
+ _NOTE: This isn't a real plugin! Copy this sample code and use it to create your own Ruby gem! [Help guide here…](https://www.bridgetownrb.com/docs/plugins)_ πŸ˜ƒ
4
4
 
5
5
  A Bridgetown plugin to [fill in the blank]…
6
6
 
@@ -14,15 +14,15 @@ Gem::Specification.new do |spec|
14
14
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features|frontend)/!) }
15
15
  spec.test_files = spec.files.grep(%r!^spec/!)
16
16
  spec.require_paths = ["lib"]
17
- spec.metadata = { "yarn-add" => "bridgetown-sample-plugin@#{SamplePlugin::VERSION}" }
17
+ spec.metadata = { "yarn-add" => "bridgetown-sample-plugin@#{SamplePlugin::VERSION}" }
18
18
 
19
19
  spec.required_ruby_version = ">= 2.5.0"
20
20
 
21
- spec.add_dependency "bridgetown", ">= 0.6", "< 2.0"
21
+ spec.add_dependency "bridgetown", ">= 0.14", "< 2.0"
22
22
 
23
23
  spec.add_development_dependency "bundler"
24
24
  spec.add_development_dependency "nokogiri", "~> 1.6"
25
25
  spec.add_development_dependency "rake", "~> 12.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
- spec.add_development_dependency "rubocop-jekyll", "~> 0.5"
27
+ spec.add_development_dependency "rubocop-bridgetown", "~> 0.2"
28
28
  end
@@ -0,0 +1 @@
1
+ <p>Just use <code>layout: sample_plugin/layout</code> in your page's front matter.</p>
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: default
3
+ title: Example Page
4
+ ---
5
+
6
+ If all goes well, this page will be accessible as [`{{ page.url }}`]({{ page.url }}), and you will see a photo of a train:
7
+
8
+ ![Train on Rails]({{ "/sample_plugin/train-on-rails.jpeg" | relative_url }})
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <p>You can include this layout in your site! πŸ₯³</p>
6
+
7
+ {% render "sample_plugin/layout_help" %}
8
+
9
+ {{ content }}
@@ -1,9 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "bridgetown"
4
+ require "sample-plugin/builder"
4
5
 
5
- module SamplePlugin
6
- autoload :LiquidTag, "sample-plugin/liquid-tag"
7
- end
8
-
9
- Liquid::Template.register_tag "sample_plugin", SamplePlugin::LiquidTag
6
+ Bridgetown::PluginManager.new_source_manifest(
7
+ origin: SamplePlugin,
8
+ components: File.expand_path("../components", __dir__),
9
+ content: File.expand_path("../content", __dir__),
10
+ layouts: File.expand_path("../layouts", __dir__)
11
+ )
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SamplePlugin
4
+ class Builder < Bridgetown::Builder
5
+ def build
6
+ liquid_tag "sample_plugin" do
7
+ "This plugin works!"
8
+ end
9
+ end
10
+ end
11
+ end
12
+
13
+ SamplePlugin::Builder.register
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SamplePlugin
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bridgetown-sample-plugin",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "main": "frontend/javascript/index.js",
5
5
  "repository": "git@github.com:bridgetownrb/bridgetown-sample-plugin.git",
6
6
  "author": "Bridgetown Maintainers <maintainers@bridgetownrb.com>",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-sample-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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-04-26 00:00:00.000000000 Z
11
+ date: 2020-05-18 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.6'
19
+ version: '0.14'
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.6'
29
+ version: '0.14'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'
@@ -87,19 +87,19 @@ dependencies:
87
87
  - !ruby/object:Gem::Version
88
88
  version: '3.0'
89
89
  - !ruby/object:Gem::Dependency
90
- name: rubocop-jekyll
90
+ name: rubocop-bridgetown
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '0.5'
95
+ version: '0.2'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '0.5'
102
+ version: '0.2'
103
103
  description:
104
104
  email: maintainers@bridgetownrb.com
105
105
  executables: []
@@ -115,15 +115,19 @@ files:
115
115
  - README.md
116
116
  - Rakefile
117
117
  - bridgetown-sample-plugin.gemspec
118
+ - components/sample_plugin/layout_help.liquid
119
+ - content/sample_plugin/example_page.md
120
+ - content/sample_plugin/train-on-rails.jpeg
121
+ - layouts/sample_plugin/layout.html
118
122
  - lib/sample-plugin.rb
119
- - lib/sample-plugin/liquid-tag.rb
123
+ - lib/sample-plugin/builder.rb
120
124
  - lib/sample-plugin/version.rb
121
125
  - package.json
122
126
  homepage: https://github.com/bridgetownrb/bridgetown-sample-plugin
123
127
  licenses:
124
128
  - MIT
125
129
  metadata:
126
- yarn-add: bridgetown-sample-plugin@0.1.2
130
+ yarn-add: bridgetown-sample-plugin@0.1.3
127
131
  post_install_message:
128
132
  rdoc_options: []
129
133
  require_paths:
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SamplePlugin
4
- class LiquidTag < Liquid::Tag
5
- def render(context)
6
- @context = context
7
-
8
- "This plugin works!"
9
- end
10
- end
11
- end