bridgetown-core 0.20.0 → 0.21.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/bridgetown-core.gemspec +0 -1
- data/lib/bridgetown-core.rb +11 -22
- data/lib/bridgetown-core/cleaner.rb +2 -2
- data/lib/bridgetown-core/collection.rb +14 -11
- data/lib/bridgetown-core/commands/build.rb +0 -11
- data/lib/bridgetown-core/commands/concerns/git_helpers.rb +20 -0
- data/lib/bridgetown-core/commands/configure.rb +4 -3
- data/lib/bridgetown-core/commands/doctor.rb +1 -19
- data/lib/bridgetown-core/commands/new.rb +6 -6
- data/lib/bridgetown-core/commands/plugins.rb +14 -13
- data/lib/bridgetown-core/commands/serve.rb +0 -14
- data/lib/bridgetown-core/commands/webpack.rb +75 -0
- data/lib/bridgetown-core/commands/webpack/enable-postcss.rb +12 -0
- data/lib/bridgetown-core/commands/webpack/setup.rb +4 -0
- data/lib/bridgetown-core/commands/webpack/update.rb +3 -0
- data/lib/bridgetown-core/commands/webpack/webpack.config.js +18 -0
- data/lib/{site_template/webpack.config.js.erb → bridgetown-core/commands/webpack/webpack.defaults.js.erb} +25 -11
- data/lib/bridgetown-core/component.rb +183 -0
- data/lib/bridgetown-core/concerns/front_matter_importer.rb +52 -0
- data/lib/bridgetown-core/concerns/layout_placeable.rb +1 -1
- data/lib/bridgetown-core/concerns/site/configurable.rb +3 -7
- data/lib/bridgetown-core/concerns/site/content.rb +2 -3
- data/lib/bridgetown-core/concerns/site/localizable.rb +3 -5
- data/lib/bridgetown-core/concerns/site/processable.rb +5 -4
- data/lib/bridgetown-core/concerns/site/writable.rb +1 -1
- data/lib/bridgetown-core/concerns/validatable.rb +1 -5
- data/lib/bridgetown-core/configuration.rb +22 -14
- data/lib/bridgetown-core/configurations/bt-postcss.rb +6 -6
- data/lib/bridgetown-core/configurations/netlify.rb +1 -0
- data/lib/bridgetown-core/configurations/tailwindcss.rb +6 -6
- data/lib/bridgetown-core/converter.rb +9 -0
- data/lib/bridgetown-core/converters/erb_templates.rb +51 -35
- data/lib/bridgetown-core/converters/liquid_templates.rb +1 -1
- data/lib/bridgetown-core/converters/markdown.rb +1 -1
- data/lib/bridgetown-core/converters/markdown/kramdown_parser.rb +2 -38
- data/lib/bridgetown-core/converters/ruby_templates.rb +17 -0
- data/lib/bridgetown-core/converters/smartypants.rb +3 -1
- data/lib/bridgetown-core/core_ext/psych.rb +19 -0
- data/lib/bridgetown-core/document.rb +3 -2
- data/lib/bridgetown-core/drops/relations_drop.rb +23 -0
- data/lib/bridgetown-core/drops/resource_drop.rb +3 -1
- data/lib/bridgetown-core/drops/unified_payload_drop.rb +1 -0
- data/lib/bridgetown-core/entry_filter.rb +7 -5
- data/lib/bridgetown-core/filters.rb +1 -25
- data/lib/bridgetown-core/filters/from_liquid.rb +23 -0
- data/lib/bridgetown-core/filters/url_filters.rb +12 -0
- data/lib/bridgetown-core/frontmatter_defaults.rb +1 -1
- data/lib/bridgetown-core/generators/prototype_generator.rb +25 -4
- data/lib/bridgetown-core/helpers.rb +48 -9
- data/lib/bridgetown-core/layout.rb +52 -20
- data/lib/bridgetown-core/model/origin.rb +1 -1
- data/lib/bridgetown-core/model/{file_origin.rb → repo_origin.rb} +33 -26
- data/lib/bridgetown-core/page.rb +2 -1
- data/lib/bridgetown-core/plugin_manager.rb +1 -1
- data/lib/bridgetown-core/publisher.rb +2 -2
- data/lib/bridgetown-core/reader.rb +13 -11
- data/lib/bridgetown-core/readers/data_reader.rb +2 -1
- data/lib/bridgetown-core/readers/defaults_reader.rb +1 -1
- data/lib/bridgetown-core/readers/layout_reader.rb +1 -1
- data/lib/bridgetown-core/readers/page_reader.rb +1 -0
- data/lib/bridgetown-core/readers/post_reader.rb +5 -4
- data/lib/bridgetown-core/regenerator.rb +1 -1
- data/lib/bridgetown-core/related_posts.rb +8 -5
- data/lib/bridgetown-core/renderer.rb +1 -1
- data/lib/bridgetown-core/resource/base.rb +80 -26
- data/lib/bridgetown-core/resource/permalink_processor.rb +1 -1
- data/lib/bridgetown-core/resource/relations.rb +132 -0
- data/lib/bridgetown-core/resource/taxonomy_term.rb +10 -1
- data/lib/bridgetown-core/resource/taxonomy_type.rb +9 -0
- data/lib/bridgetown-core/resource/transformer.rb +18 -14
- data/lib/bridgetown-core/ruby_template_view.rb +7 -11
- data/lib/bridgetown-core/site.rb +4 -5
- data/lib/bridgetown-core/tags/highlight.rb +2 -15
- data/lib/bridgetown-core/tags/include.rb +1 -1
- data/lib/bridgetown-core/tags/post_url.rb +2 -2
- data/lib/bridgetown-core/utils.rb +9 -3
- data/lib/bridgetown-core/utils/require_gems.rb +60 -0
- data/lib/bridgetown-core/utils/ruby_exec.rb +6 -9
- data/lib/bridgetown-core/utils/ruby_front_matter.rb +39 -0
- data/lib/bridgetown-core/version.rb +2 -2
- data/lib/bridgetown-core/watcher.rb +2 -1
- data/lib/bridgetown-core/yaml_parser.rb +22 -0
- data/lib/site_template/config/.keep +0 -0
- data/lib/site_template/package.json.erb +4 -4
- data/lib/site_template/plugins/site_builder.rb +1 -1
- data/lib/site_template/src/_posts/0000-00-00-welcome-to-bridgetown.md.erb +1 -1
- metadata +21 -23
- data/lib/bridgetown-core/external.rb +0 -58
- data/lib/bridgetown-core/path_manager.rb +0 -31
- data/lib/bridgetown-core/readers/static_file_reader.rb +0 -25
- data/lib/bridgetown-core/utils/platforms.rb +0 -81
- data/lib/bridgetown-core/utils/thread_event.rb +0 -31
|
@@ -7,6 +7,7 @@ module Bridgetown
|
|
|
7
7
|
require "bridgetown-core/helpers"
|
|
8
8
|
|
|
9
9
|
attr_reader :layout, :page, :paginator, :site, :content
|
|
10
|
+
alias_method :resource, :page
|
|
10
11
|
|
|
11
12
|
def initialize(convertible)
|
|
12
13
|
if convertible.is_a?(Layout)
|
|
@@ -27,17 +28,10 @@ module Bridgetown
|
|
|
27
28
|
|
|
28
29
|
def render(item, options = {}, &block)
|
|
29
30
|
if item.respond_to?(:render_in)
|
|
30
|
-
previous_buffer_state = @_erbout
|
|
31
|
-
@_erbout = Bridgetown::ERBBuffer.new
|
|
32
|
-
|
|
33
|
-
@in_view_component ||= defined?(::ViewComponent::Base) && item.is_a?(::ViewComponent::Base)
|
|
34
31
|
result = item.render_in(self, &block)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
@_erbout = previous_buffer_state
|
|
38
|
-
result
|
|
32
|
+
result&.html_safe
|
|
39
33
|
else
|
|
40
|
-
partial(item, options, &block)
|
|
34
|
+
partial(item, options, &block)&.html_safe
|
|
41
35
|
end
|
|
42
36
|
end
|
|
43
37
|
|
|
@@ -60,14 +54,15 @@ module Bridgetown
|
|
|
60
54
|
Bridgetown.logger.warn "Liquid Warning:",
|
|
61
55
|
LiquidRenderer.format_error(e, path || document.relative_path)
|
|
62
56
|
end
|
|
63
|
-
template.render!(options.deep_stringify_keys, _liquid_context)
|
|
57
|
+
template.render!(options.deep_stringify_keys, _liquid_context).html_safe
|
|
64
58
|
end
|
|
65
59
|
|
|
66
60
|
def helpers
|
|
67
61
|
@helpers ||= Helpers.new(self, site)
|
|
68
62
|
end
|
|
69
63
|
|
|
70
|
-
|
|
64
|
+
# rubocop:disable Style/MissingRespondToMissing
|
|
65
|
+
ruby2_keywords def method_missing(method, *args, &block)
|
|
71
66
|
if helpers.respond_to?(method.to_sym)
|
|
72
67
|
helpers.send method.to_sym, *args, &block
|
|
73
68
|
else
|
|
@@ -78,6 +73,7 @@ module Bridgetown
|
|
|
78
73
|
def respond_to_missing?(method, include_private = false)
|
|
79
74
|
helpers.respond_to?(method.to_sym, include_private) || super
|
|
80
75
|
end
|
|
76
|
+
# rubocop:enable Style/MissingRespondToMissing
|
|
81
77
|
|
|
82
78
|
private
|
|
83
79
|
|
data/lib/bridgetown-core/site.rb
CHANGED
|
@@ -30,12 +30,11 @@ module Bridgetown
|
|
|
30
30
|
# is default
|
|
31
31
|
alias_method :generated_pages, :pages
|
|
32
32
|
|
|
33
|
-
attr_accessor :
|
|
34
|
-
:
|
|
35
|
-
:
|
|
36
|
-
:plugin_manager, :converters, :generators, :reader
|
|
33
|
+
attr_accessor :permalink_style, :time, :baseurl, :data,
|
|
34
|
+
:file_read_opts, :plugin_manager, :converters,
|
|
35
|
+
:generators, :reader
|
|
37
36
|
|
|
38
|
-
#
|
|
37
|
+
# Initialize a new Site.
|
|
39
38
|
#
|
|
40
39
|
# config - A Hash containing site configuration details.
|
|
41
40
|
def initialize(config)
|
|
@@ -36,13 +36,11 @@ module Bridgetown
|
|
|
36
36
|
code = super.to_s.gsub(LEADING_OR_TRAILING_LINE_TERMINATORS, "")
|
|
37
37
|
|
|
38
38
|
output =
|
|
39
|
-
case context.registers[:site].highlighter
|
|
39
|
+
case context.registers[:site].config.highlighter
|
|
40
40
|
when "rouge"
|
|
41
41
|
render_rouge(code)
|
|
42
|
-
when "pygments"
|
|
43
|
-
render_pygments(code, context)
|
|
44
42
|
else
|
|
45
|
-
|
|
43
|
+
h(code).strip
|
|
46
44
|
end
|
|
47
45
|
|
|
48
46
|
rendered_output = add_code_tag(output)
|
|
@@ -72,13 +70,6 @@ module Bridgetown
|
|
|
72
70
|
options
|
|
73
71
|
end
|
|
74
72
|
|
|
75
|
-
def render_pygments(code, _context)
|
|
76
|
-
Bridgetown.logger.warn "Warning:", "Highlight Tag no longer supports" \
|
|
77
|
-
" rendering with Pygments."
|
|
78
|
-
Bridgetown.logger.warn "", "Using the default highlighter, Rouge, instead."
|
|
79
|
-
render_rouge(code)
|
|
80
|
-
end
|
|
81
|
-
|
|
82
73
|
def render_rouge(code)
|
|
83
74
|
require "rouge"
|
|
84
75
|
formatter = ::Rouge::Formatters::HTMLLegacy.new(
|
|
@@ -92,10 +83,6 @@ module Bridgetown
|
|
|
92
83
|
formatter.format(lexer.lex(code))
|
|
93
84
|
end
|
|
94
85
|
|
|
95
|
-
def render_codehighlighter(code)
|
|
96
|
-
h(code).strip
|
|
97
|
-
end
|
|
98
|
-
|
|
99
86
|
def add_code_tag(code)
|
|
100
87
|
code_attributes = [
|
|
101
88
|
"class=\"language-#{@lang.to_s.tr("+", "-")}\"",
|
|
@@ -112,7 +112,7 @@ module Bridgetown
|
|
|
112
112
|
def locate_include_file(context, file)
|
|
113
113
|
includes_dirs = tag_includes_dirs(context)
|
|
114
114
|
includes_dirs.each do |dir|
|
|
115
|
-
path =
|
|
115
|
+
path = File.join(dir, file)
|
|
116
116
|
return path if valid_include_file?(path, dir.to_s)
|
|
117
117
|
end
|
|
118
118
|
raise IOError, could_not_locate_message(file, includes_dirs)
|
|
@@ -77,14 +77,14 @@ module Bridgetown
|
|
|
77
77
|
@context = context
|
|
78
78
|
site = context.registers[:site]
|
|
79
79
|
|
|
80
|
-
site.posts.docs.each do |document|
|
|
80
|
+
site.collections.posts.docs.each do |document|
|
|
81
81
|
return relative_url(document) if @post == document
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
# New matching method did not match, fall back to old method
|
|
85
85
|
# with deprecation warning if this matches
|
|
86
86
|
|
|
87
|
-
site.posts.docs.each do |document|
|
|
87
|
+
site.collections.posts.docs.each do |document|
|
|
88
88
|
next unless @post.deprecated_equality document
|
|
89
89
|
|
|
90
90
|
Bridgetown::Deprecator.deprecation_message "A call to "\
|
|
@@ -4,9 +4,9 @@ module Bridgetown
|
|
|
4
4
|
module Utils
|
|
5
5
|
extend self
|
|
6
6
|
autoload :Ansi, "bridgetown-core/utils/ansi"
|
|
7
|
+
autoload :RequireGems, "bridgetown-core/utils/require_gems"
|
|
7
8
|
autoload :RubyExec, "bridgetown-core/utils/ruby_exec"
|
|
8
|
-
autoload :
|
|
9
|
-
autoload :ThreadEvent, "bridgetown-core/utils/thread_event"
|
|
9
|
+
autoload :RubyFrontMatterDSL, "bridgetown-core/utils/ruby_front_matter"
|
|
10
10
|
|
|
11
11
|
# Constants for use in #slugify
|
|
12
12
|
SLUGIFY_MODES = %w(raw default pretty simple ascii latin).freeze
|
|
@@ -118,7 +118,13 @@ module Bridgetown
|
|
|
118
118
|
# @return [Boolean] if the YAML front matter is present.
|
|
119
119
|
# rubocop: disable Naming/PredicateName
|
|
120
120
|
def has_yaml_header?(file)
|
|
121
|
-
File.open(file, "rb", &:readline).match?
|
|
121
|
+
File.open(file, "rb", &:readline).match? Bridgetown::FrontMatterImporter::YAML_HEADER
|
|
122
|
+
rescue EOFError
|
|
123
|
+
false
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def has_rbfm_header?(file)
|
|
127
|
+
File.open(file, "rb", &:readline).match? Bridgetown::FrontMatterImporter::RUBY_HEADER
|
|
122
128
|
rescue EOFError
|
|
123
129
|
false
|
|
124
130
|
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Bridgetown
|
|
4
|
+
module Utils
|
|
5
|
+
module RequireGems
|
|
6
|
+
class << self
|
|
7
|
+
#
|
|
8
|
+
# Require a gem or file if it's present, otherwise silently fail.
|
|
9
|
+
#
|
|
10
|
+
# names - a string gem name or array of gem names
|
|
11
|
+
#
|
|
12
|
+
def require_if_present(names)
|
|
13
|
+
Array(names).each do |name|
|
|
14
|
+
require name
|
|
15
|
+
rescue LoadError
|
|
16
|
+
Bridgetown.logger.debug "Couldn't load #{name}. Skipping."
|
|
17
|
+
yield(name, version_constraint(name)) if block_given?
|
|
18
|
+
false
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
#
|
|
23
|
+
# The version constraint required to activate a given gem.
|
|
24
|
+
#
|
|
25
|
+
# Returns a String version constraint in a parseable form for
|
|
26
|
+
# RubyGems.
|
|
27
|
+
def version_constraint
|
|
28
|
+
"> 0"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
#
|
|
32
|
+
# Require a gem or gems. If it's not present, show a very nice error
|
|
33
|
+
# message that explains everything and is much more helpful than the
|
|
34
|
+
# normal LoadError.
|
|
35
|
+
#
|
|
36
|
+
# names - a string gem name or array of gem names
|
|
37
|
+
#
|
|
38
|
+
def require_with_graceful_fail(names)
|
|
39
|
+
Array(names).each do |name|
|
|
40
|
+
Bridgetown.logger.debug "Requiring:", name.to_s
|
|
41
|
+
require name
|
|
42
|
+
rescue LoadError => e
|
|
43
|
+
Bridgetown.logger.error "Dependency Error:", <<~MSG
|
|
44
|
+
Yikes! It looks like you don't have #{name} or one of its dependencies installed.
|
|
45
|
+
In order to use Bridgetown as currently configured, you'll need to install this gem.
|
|
46
|
+
|
|
47
|
+
If you've run Bridgetown with `bundle exec`, ensure that you have included the #{name}
|
|
48
|
+
gem in your Gemfile as well.
|
|
49
|
+
|
|
50
|
+
The full error message from Ruby is: '#{e.message}'
|
|
51
|
+
|
|
52
|
+
If you run into trouble, you can find helpful resources at https://www.bridgetownrb.com/docs/community/
|
|
53
|
+
MSG
|
|
54
|
+
raise Bridgetown::Errors::MissingDependencyException, name
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -5,8 +5,8 @@ module Bridgetown
|
|
|
5
5
|
module RubyExec
|
|
6
6
|
extend self
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
def search_data_for_ruby_code(convertible, renderer)
|
|
8
|
+
# TODO: Deprecate storing Ruby code in YAML, Rb, etc. and just use native Ruby Front Matter
|
|
9
|
+
def search_data_for_ruby_code(convertible, renderer) # rubocop:todo Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
10
10
|
return if convertible.data.empty?
|
|
11
11
|
|
|
12
12
|
# Iterate using `keys` here so inline Ruby script can add new data keys
|
|
@@ -14,24 +14,21 @@ module Bridgetown
|
|
|
14
14
|
data_keys = convertible.data.keys
|
|
15
15
|
data_keys.each do |k|
|
|
16
16
|
v = convertible.data[k]
|
|
17
|
-
next unless v.is_a?(Rb) || v.is_a?(Hash)
|
|
17
|
+
next unless v.is_a?(Rb) || v.is_a?(Hash) || v.is_a?(Proc)
|
|
18
18
|
|
|
19
|
-
if v.is_a?(
|
|
19
|
+
if v.is_a?(Proc)
|
|
20
|
+
convertible.data[k] = convertible.instance_exec(&v)
|
|
21
|
+
elsif v.is_a?(Hash)
|
|
20
22
|
v.each do |nested_k, nested_v|
|
|
21
23
|
next unless nested_v.is_a?(Rb)
|
|
22
24
|
|
|
23
|
-
Bridgetown.logger.debug("Executing inline Ruby…", convertible.relative_path)
|
|
24
25
|
convertible.data[k][nested_k] = run(nested_v, convertible, renderer)
|
|
25
|
-
Bridgetown.logger.debug("Inline Ruby completed!", convertible.relative_path)
|
|
26
26
|
end
|
|
27
27
|
else
|
|
28
|
-
Bridgetown.logger.debug("Executing inline Ruby…", convertible.relative_path)
|
|
29
28
|
convertible.data[k] = run(v, convertible, renderer)
|
|
30
|
-
Bridgetown.logger.debug("Inline Ruby completed!", convertible.relative_path)
|
|
31
29
|
end
|
|
32
30
|
end
|
|
33
31
|
end
|
|
34
|
-
# rubocop:enable Metrics/AbcSize
|
|
35
32
|
|
|
36
33
|
# Sets up a new context in which to eval Ruby coming from front matter.
|
|
37
34
|
#
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Bridgetown
|
|
4
|
+
module Utils
|
|
5
|
+
module RubyFrontMatterDSL
|
|
6
|
+
def front_matter(&block)
|
|
7
|
+
RubyFrontMatter.new.tap { |fm| fm.instance_exec(&block) }
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
class RubyFrontMatter
|
|
12
|
+
def initialize
|
|
13
|
+
@data = {}
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def method_missing(key, value) # rubocop:disable Style/MissingRespondToMissing
|
|
17
|
+
return super if respond_to?(key)
|
|
18
|
+
|
|
19
|
+
set(key, value)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def each(&block)
|
|
23
|
+
@data.each(&block)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def get(key)
|
|
27
|
+
@data[key]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def set(key, value)
|
|
31
|
+
@data[key] = value
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def to_h
|
|
35
|
+
@data
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -127,6 +127,7 @@ module Bridgetown
|
|
|
127
127
|
|
|
128
128
|
def process(site, time, options)
|
|
129
129
|
begin
|
|
130
|
+
I18n.reload! # make sure any locale files get read again
|
|
130
131
|
Bridgetown::Hooks.trigger :site, :pre_reload, site
|
|
131
132
|
Bridgetown::Hooks.clear_reloadable_hooks
|
|
132
133
|
site.plugin_manager.reload_plugin_files
|
|
@@ -140,7 +141,7 @@ module Bridgetown
|
|
|
140
141
|
if options[:trace]
|
|
141
142
|
Bridgetown.logger.info e.backtrace.join("\n")
|
|
142
143
|
else
|
|
143
|
-
Bridgetown.logger.warn "
|
|
144
|
+
Bridgetown.logger.warn "Backtrace:", "Use the --trace option for more information."
|
|
144
145
|
end
|
|
145
146
|
end
|
|
146
147
|
Bridgetown.logger.info ""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Bridgetown
|
|
4
|
+
class YAMLParser
|
|
5
|
+
PERMITTED_CLASSES = [Date, Time, Rb].freeze
|
|
6
|
+
|
|
7
|
+
class << self
|
|
8
|
+
def load_file(filename, **kwargs)
|
|
9
|
+
kwargs = { permitted_classes: PERMITTED_CLASSES }.merge(kwargs)
|
|
10
|
+
YAML.safe_load_file(filename, **kwargs)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def load(yaml)
|
|
14
|
+
if RUBY_VERSION.start_with?("2.5")
|
|
15
|
+
YAML.safe_load yaml, PERMITTED_CLASSES
|
|
16
|
+
else
|
|
17
|
+
YAML.safe_load yaml, permitted_classes: PERMITTED_CLASSES
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
File without changes
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"file-loader": "^6.2.0",
|
|
26
26
|
"mini-css-extract-plugin": "^1.3.1",
|
|
27
27
|
<% if options["use-postcss"] %>
|
|
28
|
-
"postcss": "^8.
|
|
28
|
+
"postcss": "^8.3.0",
|
|
29
29
|
"postcss-flexbugs-fixes": "^4.1.0",
|
|
30
|
-
"postcss-loader": "^4.
|
|
30
|
+
"postcss-loader": "^4.3.0",
|
|
31
31
|
"postcss-preset-env": "^6.7.0",
|
|
32
32
|
<% else %>
|
|
33
|
-
"
|
|
34
|
-
"sass-loader": "^8.0.2",
|
|
33
|
+
"sass": "^1.32.8",
|
|
34
|
+
"sass-loader": "^8.0.2",
|
|
35
35
|
<% end %>
|
|
36
36
|
"webpack": "^4.44.2",
|
|
37
37
|
"webpack-cli": "^3.3.11",
|
|
@@ -21,6 +21,6 @@ def print_hi(name)
|
|
|
21
21
|
end
|
|
22
22
|
print_hi('Tom')
|
|
23
23
|
#=> prints 'Hi, Tom' to STDOUT.
|
|
24
|
-
|
|
24
|
+
```
|
|
25
25
|
|
|
26
26
|
Check out the [Bridgetown docs](https://bridgetownrb.com/docs/) for more info on how to get the most out of Bridgetown. File all bugs/feature requests at [Bridgetown’s GitHub repo](https://github.com/bridgetownrb/bridgetown). If you have questions, you can ask them on [Bridgetown Discussions on GitHub](https://github.com/bridgetownrb/bridgetown/discussions).
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bridgetown-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.21.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bridgetown Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-06-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|
|
@@ -234,20 +234,6 @@ dependencies:
|
|
|
234
234
|
- - "~>"
|
|
235
235
|
- !ruby/object:Gem::Version
|
|
236
236
|
version: '3.0'
|
|
237
|
-
- !ruby/object:Gem::Dependency
|
|
238
|
-
name: safe_yaml
|
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
|
240
|
-
requirements:
|
|
241
|
-
- - "~>"
|
|
242
|
-
- !ruby/object:Gem::Version
|
|
243
|
-
version: '1.0'
|
|
244
|
-
type: :runtime
|
|
245
|
-
prerelease: false
|
|
246
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
247
|
-
requirements:
|
|
248
|
-
- - "~>"
|
|
249
|
-
- !ruby/object:Gem::Version
|
|
250
|
-
version: '1.0'
|
|
251
237
|
- !ruby/object:Gem::Dependency
|
|
252
238
|
name: terminal-table
|
|
253
239
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -327,6 +313,7 @@ files:
|
|
|
327
313
|
- lib/bridgetown-core/commands/concerns/actions.rb
|
|
328
314
|
- lib/bridgetown-core/commands/concerns/build_options.rb
|
|
329
315
|
- lib/bridgetown-core/commands/concerns/configuration_overridable.rb
|
|
316
|
+
- lib/bridgetown-core/commands/concerns/git_helpers.rb
|
|
330
317
|
- lib/bridgetown-core/commands/concerns/summarizable.rb
|
|
331
318
|
- lib/bridgetown-core/commands/configure.rb
|
|
332
319
|
- lib/bridgetown-core/commands/console.rb
|
|
@@ -336,7 +323,15 @@ files:
|
|
|
336
323
|
- lib/bridgetown-core/commands/registrations.rb
|
|
337
324
|
- lib/bridgetown-core/commands/serve.rb
|
|
338
325
|
- lib/bridgetown-core/commands/serve/servlet.rb
|
|
326
|
+
- lib/bridgetown-core/commands/webpack.rb
|
|
327
|
+
- lib/bridgetown-core/commands/webpack/enable-postcss.rb
|
|
328
|
+
- lib/bridgetown-core/commands/webpack/setup.rb
|
|
329
|
+
- lib/bridgetown-core/commands/webpack/update.rb
|
|
330
|
+
- lib/bridgetown-core/commands/webpack/webpack.config.js
|
|
331
|
+
- lib/bridgetown-core/commands/webpack/webpack.defaults.js.erb
|
|
332
|
+
- lib/bridgetown-core/component.rb
|
|
339
333
|
- lib/bridgetown-core/concerns/data_accessible.rb
|
|
334
|
+
- lib/bridgetown-core/concerns/front_matter_importer.rb
|
|
340
335
|
- lib/bridgetown-core/concerns/layout_placeable.rb
|
|
341
336
|
- lib/bridgetown-core/concerns/liquid_renderable.rb
|
|
342
337
|
- lib/bridgetown-core/concerns/publishable.rb
|
|
@@ -369,7 +364,9 @@ files:
|
|
|
369
364
|
- lib/bridgetown-core/converters/liquid_templates.rb
|
|
370
365
|
- lib/bridgetown-core/converters/markdown.rb
|
|
371
366
|
- lib/bridgetown-core/converters/markdown/kramdown_parser.rb
|
|
367
|
+
- lib/bridgetown-core/converters/ruby_templates.rb
|
|
372
368
|
- lib/bridgetown-core/converters/smartypants.rb
|
|
369
|
+
- lib/bridgetown-core/core_ext/psych.rb
|
|
373
370
|
- lib/bridgetown-core/current.rb
|
|
374
371
|
- lib/bridgetown-core/deprecator.rb
|
|
375
372
|
- lib/bridgetown-core/document.rb
|
|
@@ -379,6 +376,7 @@ files:
|
|
|
379
376
|
- lib/bridgetown-core/drops/drop.rb
|
|
380
377
|
- lib/bridgetown-core/drops/excerpt_drop.rb
|
|
381
378
|
- lib/bridgetown-core/drops/page_drop.rb
|
|
379
|
+
- lib/bridgetown-core/drops/relations_drop.rb
|
|
382
380
|
- lib/bridgetown-core/drops/resource_drop.rb
|
|
383
381
|
- lib/bridgetown-core/drops/site_drop.rb
|
|
384
382
|
- lib/bridgetown-core/drops/static_file_drop.rb
|
|
@@ -387,10 +385,10 @@ files:
|
|
|
387
385
|
- lib/bridgetown-core/entry_filter.rb
|
|
388
386
|
- lib/bridgetown-core/errors.rb
|
|
389
387
|
- lib/bridgetown-core/excerpt.rb
|
|
390
|
-
- lib/bridgetown-core/external.rb
|
|
391
388
|
- lib/bridgetown-core/filters.rb
|
|
392
389
|
- lib/bridgetown-core/filters/condition_helpers.rb
|
|
393
390
|
- lib/bridgetown-core/filters/date_filters.rb
|
|
391
|
+
- lib/bridgetown-core/filters/from_liquid.rb
|
|
394
392
|
- lib/bridgetown-core/filters/grouping_filters.rb
|
|
395
393
|
- lib/bridgetown-core/filters/url_filters.rb
|
|
396
394
|
- lib/bridgetown-core/frontmatter_defaults.rb
|
|
@@ -409,10 +407,9 @@ files:
|
|
|
409
407
|
- lib/bridgetown-core/mime.types
|
|
410
408
|
- lib/bridgetown-core/model/base.rb
|
|
411
409
|
- lib/bridgetown-core/model/builder_origin.rb
|
|
412
|
-
- lib/bridgetown-core/model/file_origin.rb
|
|
413
410
|
- lib/bridgetown-core/model/origin.rb
|
|
411
|
+
- lib/bridgetown-core/model/repo_origin.rb
|
|
414
412
|
- lib/bridgetown-core/page.rb
|
|
415
|
-
- lib/bridgetown-core/path_manager.rb
|
|
416
413
|
- lib/bridgetown-core/plugin.rb
|
|
417
414
|
- lib/bridgetown-core/plugin_manager.rb
|
|
418
415
|
- lib/bridgetown-core/publisher.rb
|
|
@@ -423,13 +420,13 @@ files:
|
|
|
423
420
|
- lib/bridgetown-core/readers/page_reader.rb
|
|
424
421
|
- lib/bridgetown-core/readers/plugin_content_reader.rb
|
|
425
422
|
- lib/bridgetown-core/readers/post_reader.rb
|
|
426
|
-
- lib/bridgetown-core/readers/static_file_reader.rb
|
|
427
423
|
- lib/bridgetown-core/regenerator.rb
|
|
428
424
|
- lib/bridgetown-core/related_posts.rb
|
|
429
425
|
- lib/bridgetown-core/renderer.rb
|
|
430
426
|
- lib/bridgetown-core/resource/base.rb
|
|
431
427
|
- lib/bridgetown-core/resource/destination.rb
|
|
432
428
|
- lib/bridgetown-core/resource/permalink_processor.rb
|
|
429
|
+
- lib/bridgetown-core/resource/relations.rb
|
|
433
430
|
- lib/bridgetown-core/resource/taxonomy_term.rb
|
|
434
431
|
- lib/bridgetown-core/resource/taxonomy_type.rb
|
|
435
432
|
- lib/bridgetown-core/resource/transformer.rb
|
|
@@ -449,15 +446,17 @@ files:
|
|
|
449
446
|
- lib/bridgetown-core/url.rb
|
|
450
447
|
- lib/bridgetown-core/utils.rb
|
|
451
448
|
- lib/bridgetown-core/utils/ansi.rb
|
|
452
|
-
- lib/bridgetown-core/utils/
|
|
449
|
+
- lib/bridgetown-core/utils/require_gems.rb
|
|
453
450
|
- lib/bridgetown-core/utils/ruby_exec.rb
|
|
454
|
-
- lib/bridgetown-core/utils/
|
|
451
|
+
- lib/bridgetown-core/utils/ruby_front_matter.rb
|
|
455
452
|
- lib/bridgetown-core/version.rb
|
|
456
453
|
- lib/bridgetown-core/watcher.rb
|
|
454
|
+
- lib/bridgetown-core/yaml_parser.rb
|
|
457
455
|
- lib/site_template/.gitignore
|
|
458
456
|
- lib/site_template/Gemfile.erb
|
|
459
457
|
- lib/site_template/README.md
|
|
460
458
|
- lib/site_template/bridgetown.config.yml
|
|
459
|
+
- lib/site_template/config/.keep
|
|
461
460
|
- lib/site_template/frontend/javascript/index.js.erb
|
|
462
461
|
- lib/site_template/frontend/styles/index.css
|
|
463
462
|
- lib/site_template/frontend/styles/index.scss
|
|
@@ -482,7 +481,6 @@ files:
|
|
|
482
481
|
- lib/site_template/src/posts.md
|
|
483
482
|
- lib/site_template/start.js
|
|
484
483
|
- lib/site_template/sync.js
|
|
485
|
-
- lib/site_template/webpack.config.js.erb
|
|
486
484
|
homepage: https://www.bridgetownrb.com
|
|
487
485
|
licenses:
|
|
488
486
|
- MIT
|