bridgetown-core 2.0.5 → 2.1.0.beta1
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/.rubocop.yml +4 -2
- data/bin/bridgetown +19 -7
- data/bridgetown-core.gemspec +8 -6
- data/lib/bridgetown-core/collection.rb +4 -3
- data/lib/bridgetown-core/command.rb +97 -0
- data/lib/bridgetown-core/commands/application.rb +208 -0
- data/lib/bridgetown-core/commands/apply.rb +17 -29
- data/lib/bridgetown-core/commands/build.rb +9 -16
- data/lib/bridgetown-core/commands/clean.rb +7 -10
- data/lib/bridgetown-core/commands/concerns/{actions.rb → automations.rb} +103 -17
- data/lib/bridgetown-core/commands/concerns/build_options.rb +24 -60
- data/lib/bridgetown-core/commands/concerns/configuration_overridable.rb +2 -4
- data/lib/bridgetown-core/commands/configure.rb +24 -24
- data/lib/bridgetown-core/commands/console.rb +38 -34
- data/lib/bridgetown-core/commands/esbuild.rb +14 -24
- data/lib/bridgetown-core/commands/help.rb +24 -0
- data/lib/bridgetown-core/commands/new.rb +38 -60
- data/lib/bridgetown-core/commands/plugins.rb +237 -211
- data/lib/bridgetown-core/commands/registrations.rb +10 -1
- data/lib/bridgetown-core/commands/start.rb +23 -31
- data/lib/bridgetown-core/commands/thor_shim.rb +94 -0
- data/lib/bridgetown-core/component.rb +3 -3
- data/lib/bridgetown-core/concerns/publishable.rb +1 -3
- data/lib/bridgetown-core/concerns/site/localizable.rb +2 -0
- data/lib/bridgetown-core/configuration/configuration_dsl.rb +2 -2
- data/lib/bridgetown-core/configuration.rb +27 -7
- data/lib/bridgetown-core/converters/erb_templates.rb +31 -21
- data/lib/bridgetown-core/converters/ruby_templates.rb +14 -13
- data/lib/bridgetown-core/converters/serbea_templates.rb +5 -2
- data/lib/bridgetown-core/entry_filter.rb +1 -4
- data/lib/bridgetown-core/front_matter/defaults.rb +1 -1
- data/lib/bridgetown-core/front_matter/importer.rb +7 -1
- data/lib/bridgetown-core/front_matter/loaders.rb +1 -1
- data/lib/bridgetown-core/front_matter/ruby.rb +3 -9
- data/lib/bridgetown-core/generated_page.rb +2 -2
- data/lib/bridgetown-core/generators/prototype_generator.rb +1 -1
- data/lib/bridgetown-core/helpers.rb +10 -11
- data/lib/bridgetown-core/hooks.rb +2 -3
- data/lib/bridgetown-core/locale/en.yml +30 -0
- data/lib/bridgetown-core/model/base.rb +5 -5
- data/lib/bridgetown-core/model/builder_origin.rb +1 -1
- data/lib/bridgetown-core/model/origin.rb +5 -1
- data/lib/bridgetown-core/model/plugin_origin.rb +3 -1
- data/lib/bridgetown-core/model/repo_origin.rb +3 -1
- data/lib/bridgetown-core/rack/routes.rb +1 -1
- data/lib/bridgetown-core/reader.rb +2 -2
- data/lib/bridgetown-core/readers/plugin_content_reader.rb +31 -7
- data/lib/bridgetown-core/resource/base.rb +16 -7
- data/lib/bridgetown-core/resource/destination.rb +1 -1
- data/lib/bridgetown-core/resource/permalink_processor.rb +4 -4
- data/lib/bridgetown-core/static_file.rb +1 -1
- data/lib/bridgetown-core/tags/class_map.rb +0 -2
- data/lib/bridgetown-core/tasks/bridgetown_tasks.rake +8 -11
- data/lib/bridgetown-core/{ruby_template_view.rb → template_view.rb} +108 -4
- data/lib/bridgetown-core/utils/initializers.rb +28 -1
- data/lib/bridgetown-core/utils/loaders_manager.rb +2 -1
- data/lib/bridgetown-core/utils.rb +19 -1
- data/lib/bridgetown-core/watcher.rb +16 -8
- data/lib/bridgetown-core.rb +5 -10
- data/lib/roda/plugins/bridgetown_server.rb +1 -1
- data/lib/site_template/README.md +10 -8
- metadata +84 -70
- data/lib/bridgetown-core/commands/base.rb +0 -123
- data/lib/bridgetown-core/commands/concerns/summarizable.rb +0 -13
- data/lib/bridgetown-core/configurations/.keep +0 -0
- data/lib/bridgetown-core/configurations/stimulus.rb +0 -59
- data/lib/bridgetown-core/configurations/turbo/turbo_transitions.js +0 -48
- data/lib/bridgetown-core/configurations/turbo.rb +0 -35
- data/lib/bridgetown-core/configurations/vercel/vercel.json +0 -45
- data/lib/bridgetown-core/configurations/vercel/vercel_url.rb +0 -12
- data/lib/bridgetown-core/configurations/vercel.rb +0 -4
- data/lib/bridgetown-core/inflector.rb +0 -40
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cleanUrls": true,
|
|
3
|
-
"trailingSlash": false,
|
|
4
|
-
"redirects": [],
|
|
5
|
-
"headers": [
|
|
6
|
-
{
|
|
7
|
-
"source": "/(.*)",
|
|
8
|
-
"headers": [
|
|
9
|
-
{
|
|
10
|
-
"key": "X-Content-Type-Options",
|
|
11
|
-
"value": "nosniff"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"key": "X-Frame-Options",
|
|
15
|
-
"value": "DENY"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"key": "X-XSS-Protection",
|
|
19
|
-
"value": "1; mode=block"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"key": "Referrer-Policy",
|
|
23
|
-
"value": "strict-origin"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"key": "Permissions-Policy",
|
|
27
|
-
"value": "geolocation=(self), microphone=()"
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"source": "/feed.xml",
|
|
33
|
-
"headers": [
|
|
34
|
-
{
|
|
35
|
-
"key": "Content-Type",
|
|
36
|
-
"value": "application/rss+xml"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"key": "Cache-Control",
|
|
40
|
-
"value": "public, max-age=3600"
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
class Builders::VercelUrl < SiteBuilder
|
|
4
|
-
def build
|
|
5
|
-
hook :site, :pre_render do |site|
|
|
6
|
-
next unless ENV["VERCEL_URL"] && ENV["VERCEL_ENV"] != "production"
|
|
7
|
-
|
|
8
|
-
Bridgetown.logger.info("Subbing Vercel URL")
|
|
9
|
-
site.config.update(url: "https://#{ENV["VERCEL_URL"]}")
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "dry/inflector"
|
|
4
|
-
|
|
5
|
-
module Bridgetown
|
|
6
|
-
class Inflector < Dry::Inflector
|
|
7
|
-
def initialize(&) # rubocop:disable Lint/MissingSuper
|
|
8
|
-
@inflections = Dry::Inflector::Inflections.build do |inflections|
|
|
9
|
-
inflections.acronym "HTML"
|
|
10
|
-
inflections.acronym "CSS"
|
|
11
|
-
inflections.acronym "JS"
|
|
12
|
-
end
|
|
13
|
-
configure(&) if block_given?
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def configure
|
|
17
|
-
yield inflections
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
# for compatibility with Zeitwerk
|
|
21
|
-
def camelize(basename, *)
|
|
22
|
-
super(basename)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def to_s
|
|
26
|
-
"#<Bridgetown::Inflector>"
|
|
27
|
-
end
|
|
28
|
-
alias_method :inspect, :to_s
|
|
29
|
-
|
|
30
|
-
def ==(other)
|
|
31
|
-
return super unless other.is_a?(Bridgetown::Inflector)
|
|
32
|
-
|
|
33
|
-
# NOTE: strictly speaking, this might be wrong if two inflector instances have different
|
|
34
|
-
# rule sets…but as this equality check is mainly done within the automated test suite, we
|
|
35
|
-
# just assume two instances are equal. No production apps will need multiple,
|
|
36
|
-
# differently-configured inflectors running at once ;)
|
|
37
|
-
true
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|