jekyll-page-boilerplate 1.0.1 → 4.0.0
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/exe/boilerplate +1 -42
- data/exe/bplate +8 -0
- data/lib/jekyll_page_boilerplate/example.md +44 -0
- data/lib/jekyll_page_boilerplate/init.rb +9 -4
- data/lib/jekyll_page_boilerplate/list.rb +16 -0
- data/lib/jekyll_page_boilerplate/msg/readme.md +27 -0
- data/lib/jekyll_page_boilerplate/msg.rb +19 -35
- data/lib/jekyll_page_boilerplate/page.rb +115 -66
- data/lib/jekyll_page_boilerplate/version.rb +3 -1
- data/lib/jekyll_page_boilerplate.rb +17 -17
- data/lib/jekyll_page_boilerplate_cli.rb +64 -0
- metadata +23 -12
- data/lib/jekyll_page_boilerplate/example.yml +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0bdff35c4fc0b98be3987b90be503a93864c8dcb0dec6358a1cdd07f19fdc88
|
4
|
+
data.tar.gz: 8a11dca9014aaa518f9f56d4782077e3791b4342af84a8f917afe8d5b7eecf62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9a614357a7bcb5c380ab20587b34779d18d12d06380f0511a15f8187ea22b28547b640aeba05029422de27cc3e0974ac724c0b13746220a6e3455f83abf67be
|
7
|
+
data.tar.gz: 7533fd3e0811a14c04f505c444d1e61225bc624c54d9cd2aecace495884172c8628b04810d54e23639137334ea5ccdff4e65ab8dddeb8ed39c33e099e226def0
|
data/exe/boilerplate
CHANGED
@@ -5,45 +5,4 @@ STDOUT.sync = true
|
|
5
5
|
gem_dir = File.expand_path("..",File.dirname(__FILE__))
|
6
6
|
$LOAD_PATH.unshift gem_dir # Look in gem directory for resources first.
|
7
7
|
|
8
|
-
require '
|
9
|
-
require "mercenary"
|
10
|
-
|
11
|
-
Mercenary.program(:boilerplate) do |p|
|
12
|
-
p.version JekyllPageBoilerplate::VERSION
|
13
|
-
p.description 'jekyll-page-boilerplate is a gem for jekyll that helps you generate new pages'
|
14
|
-
p.syntax "jekyll-page <subcommand> [options]"
|
15
|
-
|
16
|
-
p.command(:page) do |c|
|
17
|
-
c.syntax "create BOILERPLATE_NAME \"NEW PAGE TITLE\""
|
18
|
-
c.description "Creates a page or post from a boilerplate."
|
19
|
-
|
20
|
-
c.action do |args, _|
|
21
|
-
JekyllPageBoilerplate.page args[0], args[1], c
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
p.command(:help) do |c|
|
26
|
-
c.syntax "help"
|
27
|
-
c.description "Describe what jekyll-page-boilerplate does."
|
28
|
-
|
29
|
-
c.action do
|
30
|
-
JekyllPageBoilerplate.help c
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
p.command(:init) do |c|
|
35
|
-
c.syntax "init"
|
36
|
-
c.description "Creates an example boilerplate."
|
37
|
-
|
38
|
-
c.action do
|
39
|
-
JekyllPageBoilerplate.init c
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
p.default_command(:help)
|
47
|
-
end
|
48
|
-
|
49
|
-
|
8
|
+
require 'jekyll_page_boilerplate_cli'
|
data/exe/bplate
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
_boilerplate: # The config for your boilerplates:
|
3
|
+
path: _posts # this is the folder path it will create your new post/page under.
|
4
|
+
timestamp: true # when true new post/pages will include the date in the filename.
|
5
|
+
|
6
|
+
title: {{ boilerplate.title }} # -T or --title options
|
7
|
+
created: {{ boilerplate.time }} # the current time.
|
8
|
+
|
9
|
+
layout: post # Anything else in the file will be copied to your new post/page.
|
10
|
+
author: John Doe
|
11
|
+
---
|
12
|
+
|
13
|
+
|
14
|
+
A Jekyll Boilerplate Example
|
15
|
+
----------------------------
|
16
|
+
|
17
|
+
|
18
|
+
To create a new page/post from this boilerplate run:
|
19
|
+
```bash
|
20
|
+
$ boilerplate create example "Another post about pottery"`
|
21
|
+
```
|
22
|
+
|
23
|
+
A boilerplate is a markdown file in the `_boilerplates` folder.
|
24
|
+
|
25
|
+
|
26
|
+
This would create a new file:
|
27
|
+
|
28
|
+
```text
|
29
|
+
_posts/yyyy-mm-dd-another-one-about-pottery.markdown
|
30
|
+
---
|
31
|
+
title: Another one about pottery
|
32
|
+
created: 'yyyy-mm-dd hh:mm:ss -0000'
|
33
|
+
layout: post
|
34
|
+
author: John Doe
|
35
|
+
---
|
36
|
+
|
37
|
+
A Jekyll Boilerplate Example
|
38
|
+
----------------------------
|
39
|
+
|
40
|
+
To create a new page/post from this boilerplate run:
|
41
|
+
|
42
|
+
recursion error...
|
43
|
+
|
44
|
+
```
|
@@ -1,11 +1,16 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
|
3
3
|
module JekyllPageBoilerplate
|
4
|
-
|
4
|
+
class Init
|
5
|
+
|
6
|
+
def self.run
|
7
|
+
self.setup
|
8
|
+
return 'Created _boilerplates/example.md'
|
9
|
+
end
|
10
|
+
|
5
11
|
def self.setup
|
6
12
|
FileUtils.mkpath('_boilerplates')
|
7
|
-
FileUtils.cp(File.join(__dir__, 'example.
|
13
|
+
FileUtils.cp(File.join(__dir__, 'example.md'), '_boilerplates')
|
8
14
|
end
|
9
|
-
|
10
15
|
end
|
11
|
-
end
|
16
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
A boilerplate is a markdown file in the `_boilerplates` folder.
|
2
|
+
|
3
|
+
ie. `_boilerplates/post.yml`
|
4
|
+
---
|
5
|
+
_boilerplate: # boilerplate settings
|
6
|
+
path: _posts # the path to create the new page under.
|
7
|
+
timestap: true # when true new post/pages will include the date in the filename.
|
8
|
+
|
9
|
+
title: {{ boilerplate.title }}
|
10
|
+
layout: post # everthing else will be copied to the new post.
|
11
|
+
author: John Doe
|
12
|
+
|
13
|
+
`$ boilerplate page post "Another one about pottery"` would create a new file `_posts/yyyy-mm-dd-another-one-about-pottery.markdown`
|
14
|
+
---
|
15
|
+
title: Another one about pottery
|
16
|
+
created: 'yyyy-mm-dd hh:mm:ss -0000'
|
17
|
+
layout: post
|
18
|
+
author: John Doe
|
19
|
+
---
|
20
|
+
|
21
|
+
Usage: `$ boilerplate [page|init|help]`
|
22
|
+
|
23
|
+
`$ boilerplate init`: creates a example boilerplate at `_boilerplates/example.md`
|
24
|
+
|
25
|
+
`$ boilerplate page <boilerplate-name> <post-title>`: Creates a new page from a boilerplate
|
26
|
+
|
27
|
+
`$ boilerplate help`: shows this dialog.
|
@@ -1,40 +1,24 @@
|
|
1
1
|
|
2
|
-
module JekyllPageBoilerplate
|
3
|
-
module Msg
|
2
|
+
module JekyllPageBoilerplate::Msg
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
---
|
13
|
-
path: _posts
|
14
|
-
timestap: true
|
15
|
-
|
16
|
-
header:
|
17
|
-
layout: post
|
18
|
-
author: John Doe
|
19
|
-
|
20
|
-
Boilerplate yaml settings:
|
21
|
-
path - the path to create the new page under.
|
22
|
-
timestamp - when true new post/pages will include the date in the filename.
|
23
|
-
header - Any yaml you put under `header` will be added to your new pages/post
|
24
|
-
|
4
|
+
def self.file name
|
5
|
+
puts File.read(File.join(__dir__, 'msg', name))
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.error(**msgs)
|
9
|
+
msgs.each {|k,v| puts(k.to_s.capitalize!+': '+v)}
|
10
|
+
end
|
25
11
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
---
|
30
|
-
title: Another one about pottery
|
31
|
-
created: 'yyyy-mm-dd hh:mm:ss -0000'
|
32
|
-
layout: post
|
33
|
-
author: John Doe
|
34
|
-
---
|
35
|
-
|
12
|
+
def self.info msg
|
13
|
+
puts msg
|
14
|
+
end
|
36
15
|
|
37
|
-
|
38
|
-
|
16
|
+
def self.try_and_report &block
|
17
|
+
begin
|
18
|
+
self.info block.call
|
19
|
+
rescue => e
|
20
|
+
self.error fatal: e.message
|
21
|
+
end
|
39
22
|
end
|
40
|
-
|
23
|
+
|
24
|
+
end
|
@@ -1,95 +1,144 @@
|
|
1
1
|
|
2
2
|
require 'yaml'
|
3
3
|
require "stringex"
|
4
|
+
require 'securerandom'
|
5
|
+
|
6
|
+
class JekyllPageBoilerplate::Page
|
7
|
+
|
8
|
+
BOILERPLATES_PATH = '_boilerplates'
|
9
|
+
FILE_DATE_FORMATE = '%Y-%m-%d'
|
10
|
+
READ_CONFIG_REGEX = /[\r\n\s]{0,}^_boilerplate:(\s*^[\t ]{1,2}.+$)+[\r\s\n]{0,}(?![^\r\s\n])/
|
11
|
+
READ_FILE_REGEX = /^-{3}\s*^(?<head>[\s\S]*)^-{3}\s^(?<body>[\s\S]*)/
|
12
|
+
TAGS_REGEX = /(?<tag>\{{2}\s{0,}boilerplate\.(?<key>[^\{\}\.\s]+)\s{0,}\}{2})/
|
13
|
+
|
14
|
+
attr_reader :config
|
15
|
+
|
16
|
+
def self.run boilerplate, options
|
17
|
+
page = self.new(boilerplate, options)
|
18
|
+
page.create
|
19
|
+
return "Created %s/%s" % [page.config['path'], page.config['file']]
|
20
|
+
end
|
4
21
|
|
5
|
-
|
6
|
-
|
22
|
+
def initialize boilerplate, options
|
23
|
+
options.compact!
|
24
|
+
options.transform_keys! {|k| k.to_s}
|
25
|
+
plate_path = get_boilerplate_path(boilerplate).to_s
|
7
26
|
|
8
|
-
|
9
|
-
FILE_DATE_FORMATE = '%Y-%m-%d'
|
27
|
+
abort_unless_file_exists( plate_path )
|
10
28
|
|
29
|
+
parsed_file = {}
|
30
|
+
File.open(plate_path, 'r') do |file|
|
31
|
+
parsed_file = file.read.match(READ_FILE_REGEX).named_captures
|
32
|
+
end
|
11
33
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
34
|
+
@config = get_config(parsed_file['head']).merge(options)
|
35
|
+
@config['suffix'] ||= plate_path[/\.\w+$/]
|
36
|
+
@config['name'] ||= plate_path[/.*(?=\.)/] || plate_path
|
37
|
+
@head = get_head(parsed_file['head'])
|
38
|
+
@body = get_body(parsed_file['body'])
|
39
|
+
end
|
40
|
+
|
41
|
+
def create
|
42
|
+
@config['time'] ||= Time.now.to_s
|
43
|
+
@config['date'] ||= Time.now.strftime(FILE_DATE_FORMATE)
|
44
|
+
|
45
|
+
abort_unless_file_exists(@config['path'])
|
17
46
|
|
18
|
-
|
19
|
-
abort_unless_file_exists(@boilerplate['path'])
|
20
|
-
|
21
|
-
add_header_title( title )
|
22
|
-
add_header_created()
|
23
|
-
|
24
|
-
create_new_page( title )
|
25
|
-
|
26
|
-
@boilerplate
|
27
|
-
end
|
47
|
+
@config['file'] ||= get_new_page_filename(@config['title'] || @config['name'])
|
28
48
|
|
29
|
-
|
49
|
+
scan_template :@body
|
50
|
+
scan_template :@head
|
30
51
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
new_file_path = File.join( @boilerplate['path'], filename )
|
52
|
+
create_new_page @config['file']
|
53
|
+
end
|
35
54
|
|
36
|
-
|
55
|
+
private
|
56
|
+
|
57
|
+
def create_new_page filename
|
58
|
+
new_file_path = File.join( @config['path'], filename )
|
37
59
|
|
38
|
-
|
39
|
-
page.puts @boilerplate['header'].to_yaml
|
40
|
-
page.puts '---'
|
41
|
-
page.puts ''
|
42
|
-
page.print @boilerplate['content']
|
43
|
-
page.puts ''
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|
60
|
+
abort_if_file_exists(new_file_path)
|
47
61
|
|
62
|
+
open(new_file_path, 'w') do |page|
|
63
|
+
page.puts '---'
|
64
|
+
page.puts @head.lstrip
|
65
|
+
page.puts '---'
|
66
|
+
page.puts @body
|
67
|
+
page.puts ''
|
68
|
+
end
|
69
|
+
end
|
48
70
|
|
49
|
-
|
50
|
-
|
71
|
+
def scan_template var
|
72
|
+
instance_variable_get(var).scan(TAGS_REGEX).uniq.each do |tag, key|
|
73
|
+
instance_variable_get(var).gsub! /\{{2}\s{0,}boilerplate\.#{key}\s{0,}\}{2}/, get_tag_value(key)
|
51
74
|
end
|
52
|
-
|
53
|
-
def add_header_title title
|
54
|
-
@boilerplate['header']['title'] = title.gsub(/[&-]/, '&'=>'&', '-'=>' ')
|
55
|
-
end
|
56
|
-
|
75
|
+
end
|
57
76
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
77
|
+
def get_tag_value(key)
|
78
|
+
return @config[key] if @config[key]
|
79
|
+
key = key.split('=')
|
80
|
+
return Tag.send(key[0].to_sym, *key[1]&.split(','))
|
81
|
+
end
|
82
|
+
|
83
|
+
class Tag
|
84
|
+
class << self
|
85
|
+
def missing_method
|
86
|
+
nil
|
65
87
|
end
|
66
|
-
end
|
67
|
-
|
68
88
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
if @boilerplate['timestamp']
|
73
|
-
title = "#{Time.now.strftime(FILE_DATE_FORMATE)}-#{title}"
|
89
|
+
def random_url length = nil
|
90
|
+
length && length = length.to_i
|
91
|
+
SecureRandom.urlsafe_base64(length)
|
74
92
|
end
|
75
|
-
return title
|
76
93
|
end
|
94
|
+
end
|
77
95
|
|
96
|
+
def fill_template key, val
|
97
|
+
@head.gsub! /\{{2}\s{0,}boilerplate\.#{key}\s{0,}\}{2}/, @config[key].to_s
|
98
|
+
@body.gsub! /\{{2}\s{0,}boilerplate\.#{key}\s{0,}\}{2}/, @config[key].to_s
|
99
|
+
end
|
78
100
|
|
101
|
+
def get_body markdown
|
102
|
+
return markdown
|
103
|
+
end
|
79
104
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
end
|
84
|
-
end
|
105
|
+
def get_config head
|
106
|
+
return YAML.load(head.match(READ_CONFIG_REGEX).to_s)['_boilerplate']
|
107
|
+
end
|
85
108
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
109
|
+
def get_head head
|
110
|
+
return head.gsub( READ_CONFIG_REGEX, '')
|
111
|
+
end
|
112
|
+
|
113
|
+
|
114
|
+
def get_boilerplate_path plate_name
|
115
|
+
return Dir.glob(
|
116
|
+
"#{File.join(BOILERPLATES_PATH, plate_name)}*"
|
117
|
+
).first
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
def get_new_page_filename title
|
122
|
+
title = title.to_url
|
123
|
+
title = "#{title}#{@config['suffix']}"
|
124
|
+
if @config['timestamp']
|
125
|
+
title = "#{@config['date']}-#{title}"
|
90
126
|
end
|
127
|
+
return title
|
128
|
+
end
|
129
|
+
|
91
130
|
|
92
131
|
|
132
|
+
def abort_if_file_exists(file_path)
|
133
|
+
if File.exist?(file_path)
|
134
|
+
raise "#{file_path} already exists!"
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
def abort_unless_file_exists(file_path)
|
139
|
+
unless File.exist?(file_path)
|
140
|
+
raise "The file `#{file_path}` does not exist!"
|
141
|
+
end
|
93
142
|
end
|
94
143
|
|
95
|
-
end
|
144
|
+
end
|
@@ -1,33 +1,33 @@
|
|
1
1
|
require "jekyll_page_boilerplate/version"
|
2
|
-
require "jekyll_page_boilerplate/page"
|
3
2
|
require "jekyll_page_boilerplate/msg"
|
3
|
+
require "jekyll_page_boilerplate/page"
|
4
4
|
require "jekyll_page_boilerplate/init"
|
5
|
+
require "jekyll_page_boilerplate/list"
|
6
|
+
|
5
7
|
|
6
8
|
module JekyllPageBoilerplate
|
7
9
|
class Error < StandardError; end
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
Init.setup
|
13
|
-
rescue => e
|
14
|
-
cmd.logger.fatal e.message
|
11
|
+
def self.init
|
12
|
+
Msg.try_and_report do
|
13
|
+
Init.run
|
15
14
|
end
|
16
15
|
end
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
def self.list
|
18
|
+
Msg.try_and_report do
|
19
|
+
List.run
|
20
|
+
end
|
21
21
|
end
|
22
22
|
|
23
|
+
def self.readme
|
24
|
+
Msg.file 'readme.md'
|
25
|
+
end
|
23
26
|
|
24
|
-
def self.page boilerplate_name,
|
25
|
-
|
26
|
-
|
27
|
-
page.create(page_title)
|
28
|
-
rescue => e
|
29
|
-
cmd.logger.fatal e.message
|
27
|
+
def self.page boilerplate_name, options
|
28
|
+
Msg.try_and_report do
|
29
|
+
Page.run(boilerplate_name, options)
|
30
30
|
end
|
31
|
-
end
|
31
|
+
end
|
32
32
|
|
33
33
|
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require "bales"
|
2
|
+
require 'jekyll_page_boilerplate'
|
3
|
+
|
4
|
+
class JekyllPageBoilerplate::Application < Bales::Application
|
5
|
+
version JekyllPageBoilerplate::VERSION
|
6
|
+
description JekyllPageBoilerplate::DESCRIPTION
|
7
|
+
|
8
|
+
# `boilerplate <page>`
|
9
|
+
option :title, type: String, long_form: '--title', short_form: '-T',
|
10
|
+
description: "`path/<title>.md`"
|
11
|
+
option :path, type: String, long_form: '--path', short_form: '-p',
|
12
|
+
description: "`<path>/title.md`"
|
13
|
+
option :timestamp, type: TrueClass, long_form: '--timestamp', short_form: '-s',
|
14
|
+
description: "`path/<time.now>-title.md`"
|
15
|
+
option :suffix, type: String, long_form: '--suffix', short_form: '-x',
|
16
|
+
description: "`path/title.<md, markdown, txt>`"
|
17
|
+
|
18
|
+
action do |plate, title: nil, path: nil, timestamp: nil, suffix: nil|
|
19
|
+
JekyllPageBoilerplate.page plate, {title: title, path: path, suffix: suffix, timestamp: timestamp}
|
20
|
+
end
|
21
|
+
|
22
|
+
# `boilerplate readme`
|
23
|
+
command 'readme' do
|
24
|
+
description "Helpful info"
|
25
|
+
action do
|
26
|
+
JekyllPageBoilerplate.readme
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# `boilerplate help`
|
31
|
+
command 'help', parent: Bales::Command::Help
|
32
|
+
|
33
|
+
# `boilerplate init`
|
34
|
+
command 'init' do
|
35
|
+
description "Creates an example boilerplate."
|
36
|
+
action do
|
37
|
+
JekyllPageBoilerplate.init
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# `boilerplate list`
|
42
|
+
command 'list' do
|
43
|
+
description "List all the boilerplates"
|
44
|
+
action do
|
45
|
+
JekyllPageBoilerplate.list
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
def self.run(*args, **opts)
|
51
|
+
begin
|
52
|
+
super
|
53
|
+
rescue => e
|
54
|
+
JekyllPageBoilerplate.readme
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
JekyllPageBoilerplate::Application.parse_and_run
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
metadata
CHANGED
@@ -1,59 +1,70 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-page-boilerplate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Ferney
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bales
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.1.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.1.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: stringex
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.8'
|
31
34
|
- - ">="
|
32
35
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
36
|
+
version: 2.8.5
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.8'
|
38
44
|
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
46
|
+
version: 2.8.5
|
41
47
|
description: A jekyll plugin that allows you to create new pages or posts from a boilerplate
|
42
48
|
through the terminal.
|
43
49
|
email:
|
44
50
|
- sean@codekarma.dev
|
45
51
|
executables:
|
46
52
|
- boilerplate
|
53
|
+
- bplate
|
47
54
|
extensions: []
|
48
55
|
extra_rdoc_files: []
|
49
56
|
files:
|
50
57
|
- exe/boilerplate
|
58
|
+
- exe/bplate
|
51
59
|
- lib/jekyll_page_boilerplate.rb
|
52
|
-
- lib/jekyll_page_boilerplate/example.
|
60
|
+
- lib/jekyll_page_boilerplate/example.md
|
53
61
|
- lib/jekyll_page_boilerplate/init.rb
|
62
|
+
- lib/jekyll_page_boilerplate/list.rb
|
54
63
|
- lib/jekyll_page_boilerplate/msg.rb
|
64
|
+
- lib/jekyll_page_boilerplate/msg/readme.md
|
55
65
|
- lib/jekyll_page_boilerplate/page.rb
|
56
66
|
- lib/jekyll_page_boilerplate/version.rb
|
67
|
+
- lib/jekyll_page_boilerplate_cli.rb
|
57
68
|
homepage: https://github.com/CodeKarmaDev/jekyll-page-boilerplate
|
58
69
|
licenses:
|
59
70
|
- MIT
|
@@ -75,8 +86,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
86
|
- !ruby/object:Gem::Version
|
76
87
|
version: '0'
|
77
88
|
requirements: []
|
78
|
-
rubygems_version: 3.
|
89
|
+
rubygems_version: 3.2.3
|
79
90
|
signing_key:
|
80
91
|
specification_version: 4
|
81
|
-
summary: A jekyll plugin that
|
92
|
+
summary: A jekyll plugin that creates new pages from boilerplates
|
82
93
|
test_files: []
|
@@ -1,43 +0,0 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
# Create a new jekyll page/post from a boilerplate.
|
4
|
-
|
5
|
-
# A boilerplate is a yaml file in the `_boilerplates` folder.
|
6
|
-
|
7
|
-
# `$ boilerplate page example "Another post about pottery"`
|
8
|
-
|
9
|
-
# the path to create the new page under.
|
10
|
-
path: _posts
|
11
|
-
|
12
|
-
# when true new post/pages will include the date in the filename.
|
13
|
-
timestamp: true
|
14
|
-
|
15
|
-
# Any yaml you put under `header` will be added to your new pages/post
|
16
|
-
header:
|
17
|
-
layout: post
|
18
|
-
author: John Doe
|
19
|
-
|
20
|
-
# the boilerplate markdown content for your page
|
21
|
-
content: '
|
22
|
-
|
23
|
-
# Heading
|
24
|
-
|
25
|
-
|
26
|
-
Some stuff that changes a little bit but that I don't want to bother copying and pasting.'
|
27
|
-
|
28
|
-
|
29
|
-
# This would create a new file:
|
30
|
-
# _posts/yyyy-mm-dd-another-one-about-pottery.markdow`
|
31
|
-
# ---
|
32
|
-
# title: Another one about pottery
|
33
|
-
# created: 'yyyy-mm-dd hh:mm:ss -0000'
|
34
|
-
# layout: post
|
35
|
-
# author: John Doe
|
36
|
-
# ---
|
37
|
-
#
|
38
|
-
# Heading
|
39
|
-
# -------
|
40
|
-
#
|
41
|
-
# Some stuff that changes a little bit but that I don't want to bother copying and pasting.
|
42
|
-
#
|
43
|
-
#
|