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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a93e2b4e7e502c0d19906f1dae2786f6fb1ceecf39d52c0dbdf82db241215e2
4
- data.tar.gz: 71434d9ca5e0072c25543fc2180b37ee59ce4702d73dde7ea454c16bf14d56cd
3
+ metadata.gz: d0bdff35c4fc0b98be3987b90be503a93864c8dcb0dec6358a1cdd07f19fdc88
4
+ data.tar.gz: 8a11dca9014aaa518f9f56d4782077e3791b4342af84a8f917afe8d5b7eecf62
5
5
  SHA512:
6
- metadata.gz: 9cf262a0c5dc30f2af6b428ab50c0a9b5942c7e192c3e5f18a6e56dab04f2c081f3137119dabce88d108fedc9b65703363985df7a292fd70e472bcc15d778228
7
- data.tar.gz: f09fcfbd8dec7ef599e738b9dc45b4616ac181b07088dce6e1025bf3db9ccac32a24b52be9624d24304c03bc011d841cbdda157cdf20e7d8d7b77f12749c7ed9
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 'jekyll_page_boilerplate'
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,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ STDOUT.sync = true
4
+
5
+ gem_dir = File.expand_path("..",File.dirname(__FILE__))
6
+ $LOAD_PATH.unshift gem_dir # Look in gem directory for resources first.
7
+
8
+ require 'jekyll_page_boilerplate_cli'
@@ -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
- module Init
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.yml'), '_boilerplates')
13
+ FileUtils.cp(File.join(__dir__, 'example.md'), '_boilerplates')
8
14
  end
9
-
10
15
  end
11
- end
16
+ end
@@ -0,0 +1,16 @@
1
+
2
+ module JekyllPageBoilerplate
3
+
4
+ class List
5
+
6
+ SPACER = '\n'
7
+ REMOVE_SUFFIX = /\.\w+(?=[\s\n\r$])/
8
+
9
+ def self.run
10
+ Dir.glob("_boilerplates/*").map do |f|
11
+ File.basename(f, '.*')
12
+ end
13
+ end
14
+
15
+ 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
- HELP = <<-'HELP'
6
-
7
- Create a new jekyll page/post from a boilerplate.
8
-
9
- A boilerplate is a yaml file in the `_boilerplates` folder.
10
-
11
- ie. `_boilerplates/post.yml`
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
- `$ boilerplate page post "Another one about pottery"`
27
-
28
- would create a new file `_posts/yyyy-mm-dd-another-one-about-pottery.markdown`
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
- HELP
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
- end
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
- module JekyllPageBoilerplate
6
- class Page
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
- BOILERPLATES_PATH = '_boilerplates'
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
- def initialize boilerplate, suffix: '.yml'
13
- plate_path = File.join(BOILERPLATES_PATH, "#{boilerplate}#{suffix}")
14
-
15
- set_boilerplate_from_yaml_file( plate_path )
16
- end
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
- def create title
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
- private
49
+ scan_template :@body
50
+ scan_template :@head
30
51
 
31
- def create_new_page title
32
- filename = get_new_page_filename( title )
33
-
34
- new_file_path = File.join( @boilerplate['path'], filename )
52
+ create_new_page @config['file']
53
+ end
35
54
 
36
- abort_if_file_exists(new_file_path)
55
+ private
56
+
57
+ def create_new_page filename
58
+ new_file_path = File.join( @config['path'], filename )
37
59
 
38
- open(new_file_path, 'w') do |page|
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
- def add_header_created
50
- @boilerplate['header']['created'] = Time.now.to_s
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(/[&-]/, '&'=>'&amp;', '-'=>' ')
55
- end
56
-
75
+ end
57
76
 
58
- def set_boilerplate_from_yaml_file yaml_path
59
- abort_unless_file_exists( yaml_path )
60
-
61
- @boilerplate = {}
62
-
63
- File.open(yaml_path, 'r') do |yaml_file|
64
- @boilerplate = YAML.load( yaml_file.read )
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
- def get_new_page_filename title
70
- title = title.to_url
71
- title = "#{title}#{@boilerplate['suffix'] || '.markdown'}"
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
- def abort_if_file_exists(file_path)
81
- if File.exist?(file_path)
82
- raise "#{file_path} already exists!"
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
- def abort_unless_file_exists(file_path)
87
- unless File.exist?(file_path)
88
- raise "#{file_path} does not exist!"
89
- end
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,3 +1,5 @@
1
1
  module JekyllPageBoilerplate
2
- VERSION = "1.0.1"
2
+ VERSION = "4.0.0"
3
+
4
+ DESCRIPTION = "A jekyll plugin that allows you to create new pages or posts from a boilerplate through the terminal."
3
5
  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
- def self.init cmd
11
- begin
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
- def self.help cmd
20
- cmd.logger.info Msg::HELP
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, page_title, cmd
25
- page = Page.new(boilerplate_name)
26
- begin
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: 1.0.1
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: 2020-10-26 00:00:00.000000000 Z
11
+ date: 2022-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: mercenary
14
+ name: bales
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.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.4.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: '0'
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: '0'
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.yml
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.0.8
89
+ rubygems_version: 3.2.3
79
90
  signing_key:
80
91
  specification_version: 4
81
- summary: A jekyll plugin that create new pages from boilerplates
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
- #