bridgetown-core 1.0.0.beta3 → 1.1.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -1
- data/lib/bridgetown-core/collection.rb +37 -20
- data/lib/bridgetown-core/commands/concerns/actions.rb +3 -2
- data/lib/bridgetown-core/commands/configure.rb +1 -1
- data/lib/bridgetown-core/commands/esbuild/esbuild.config.js +20 -16
- data/lib/bridgetown-core/commands/esbuild/esbuild.defaults.js.erb +95 -12
- data/lib/bridgetown-core/commands/new.rb +10 -9
- data/lib/bridgetown-core/commands/plugins.rb +2 -0
- data/lib/bridgetown-core/commands/start.rb +3 -0
- data/lib/bridgetown-core/commands/webpack/update.rb +3 -3
- data/lib/bridgetown-core/commands/webpack/webpack.defaults.js.erb +19 -14
- data/lib/bridgetown-core/component.rb +13 -7
- data/lib/bridgetown-core/concerns/localizable.rb +20 -0
- data/lib/bridgetown-core/concerns/prioritizable.rb +44 -0
- data/lib/bridgetown-core/concerns/publishable.rb +11 -1
- data/lib/bridgetown-core/concerns/site/configurable.rb +2 -10
- data/lib/bridgetown-core/concerns/site/localizable.rb +5 -1
- data/lib/bridgetown-core/concerns/site/ssr.rb +3 -3
- data/lib/bridgetown-core/concerns/site/writable.rb +28 -0
- data/lib/bridgetown-core/configuration.rb +2 -0
- data/lib/bridgetown-core/configurations/bt-postcss/postcss.config.js +5 -3
- data/lib/bridgetown-core/configurations/bt-postcss.rb +1 -1
- data/lib/bridgetown-core/configurations/gh-pages/gh-pages.yml +33 -0
- data/lib/bridgetown-core/configurations/gh-pages.rb +16 -0
- data/lib/bridgetown-core/configurations/lit/esbuild-plugins.js +21 -0
- data/lib/bridgetown-core/configurations/lit/happy-days.lit.js +26 -0
- data/lib/bridgetown-core/configurations/lit/lit-components-entry.js +1 -0
- data/lib/bridgetown-core/configurations/lit/lit-ssr.config.js +6 -0
- data/lib/bridgetown-core/configurations/lit.rb +95 -0
- data/lib/bridgetown-core/configurations/open-props/variables.css.erb +11 -0
- data/lib/bridgetown-core/configurations/open-props.rb +21 -0
- data/lib/bridgetown-core/configurations/ruby2js/hello_world.js.rb +9 -0
- data/lib/bridgetown-core/configurations/ruby2js.rb +67 -0
- data/lib/bridgetown-core/configurations/shoelace.rb +50 -0
- data/lib/bridgetown-core/configurations/tailwindcss.rb +16 -2
- data/lib/bridgetown-core/converters/markdown/kramdown_parser.rb +1 -1
- data/lib/bridgetown-core/drops/generated_page_drop.rb +2 -1
- data/lib/bridgetown-core/drops/resource_drop.rb +2 -1
- data/lib/bridgetown-core/errors.rb +5 -5
- data/lib/bridgetown-core/filters/translation_filters.rb +11 -0
- data/lib/bridgetown-core/filters/url_filters.rb +37 -10
- data/lib/bridgetown-core/filters.rb +3 -0
- data/lib/bridgetown-core/frontmatter_defaults.rb +14 -8
- data/lib/bridgetown-core/generated_page.rb +1 -0
- data/lib/bridgetown-core/kramdown/parser/gfm.rb +36 -0
- data/lib/bridgetown-core/model/base.rb +1 -2
- data/lib/bridgetown-core/plugin.rb +6 -37
- data/lib/bridgetown-core/plugin_manager.rb +3 -2
- data/lib/bridgetown-core/rack/boot.rb +5 -0
- data/lib/bridgetown-core/rack/logger.rb +14 -4
- data/lib/bridgetown-core/rack/roda.rb +102 -10
- data/lib/bridgetown-core/rack/routes.rb +87 -6
- data/lib/bridgetown-core/resource/base.rb +4 -6
- data/lib/bridgetown-core/resource/destination.rb +18 -0
- data/lib/bridgetown-core/resource/permalink_processor.rb +6 -4
- data/lib/bridgetown-core/resource/relations.rb +1 -1
- data/lib/bridgetown-core/utils/aux.rb +2 -1
- data/lib/bridgetown-core/utils/require_gems.rb +3 -6
- data/lib/bridgetown-core/utils.rb +25 -12
- data/lib/bridgetown-core/version.rb +2 -2
- data/lib/bridgetown-core/watcher.rb +19 -6
- data/lib/bridgetown-core.rb +8 -2
- data/lib/site_template/Gemfile.erb +1 -1
- data/lib/site_template/README.md +2 -2
- data/lib/site_template/TEMPLATES/erb/_components/shared/navbar.erb +4 -4
- data/lib/site_template/TEMPLATES/liquid/_components/navbar.liquid +4 -4
- data/lib/site_template/TEMPLATES/serbea/_components/shared/navbar.serb +4 -4
- data/lib/site_template/bridgetown.config.yml +10 -3
- data/lib/site_template/frontend/javascript/index.js.erb +1 -0
- data/lib/site_template/frontend/styles/syntax-highlighting.css +77 -0
- data/lib/site_template/package.json.erb +18 -18
- data/lib/site_template/server/roda_app.rb +3 -6
- data/lib/site_template/src/404.html +2 -1
- data/lib/site_template/src/500.html +10 -0
- metadata +20 -3
- data/lib/bridgetown-core/publisher.rb +0 -29
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: 1.
|
4
|
+
version: 1.1.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02
|
11
|
+
date: 2022-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -409,6 +409,8 @@ files:
|
|
409
409
|
- lib/bridgetown-core/concerns/front_matter_importer.rb
|
410
410
|
- lib/bridgetown-core/concerns/layout_placeable.rb
|
411
411
|
- lib/bridgetown-core/concerns/liquid_renderable.rb
|
412
|
+
- lib/bridgetown-core/concerns/localizable.rb
|
413
|
+
- lib/bridgetown-core/concerns/prioritizable.rb
|
412
414
|
- lib/bridgetown-core/concerns/publishable.rb
|
413
415
|
- lib/bridgetown-core/concerns/site/configurable.rb
|
414
416
|
- lib/bridgetown-core/concerns/site/content.rb
|
@@ -431,13 +433,25 @@ files:
|
|
431
433
|
- lib/bridgetown-core/configurations/cypress/cypress_dir/support/commands.js
|
432
434
|
- lib/bridgetown-core/configurations/cypress/cypress_dir/support/index.js
|
433
435
|
- lib/bridgetown-core/configurations/cypress/cypress_tasks
|
436
|
+
- lib/bridgetown-core/configurations/gh-pages.rb
|
437
|
+
- lib/bridgetown-core/configurations/gh-pages/gh-pages.yml
|
438
|
+
- lib/bridgetown-core/configurations/lit.rb
|
439
|
+
- lib/bridgetown-core/configurations/lit/esbuild-plugins.js
|
440
|
+
- lib/bridgetown-core/configurations/lit/happy-days.lit.js
|
441
|
+
- lib/bridgetown-core/configurations/lit/lit-components-entry.js
|
442
|
+
- lib/bridgetown-core/configurations/lit/lit-ssr.config.js
|
434
443
|
- lib/bridgetown-core/configurations/minitesting.rb
|
435
444
|
- lib/bridgetown-core/configurations/netlify.rb
|
436
445
|
- lib/bridgetown-core/configurations/netlify/netlify.sh
|
437
446
|
- lib/bridgetown-core/configurations/netlify/netlify.toml
|
447
|
+
- lib/bridgetown-core/configurations/open-props.rb
|
448
|
+
- lib/bridgetown-core/configurations/open-props/variables.css.erb
|
438
449
|
- lib/bridgetown-core/configurations/purgecss.rb
|
439
450
|
- lib/bridgetown-core/configurations/render.rb
|
440
451
|
- lib/bridgetown-core/configurations/render/render.yaml.erb
|
452
|
+
- lib/bridgetown-core/configurations/ruby2js.rb
|
453
|
+
- lib/bridgetown-core/configurations/ruby2js/hello_world.js.rb
|
454
|
+
- lib/bridgetown-core/configurations/shoelace.rb
|
441
455
|
- lib/bridgetown-core/configurations/stimulus.rb
|
442
456
|
- lib/bridgetown-core/configurations/tailwindcss.rb
|
443
457
|
- lib/bridgetown-core/configurations/tailwindcss/css_imports.css
|
@@ -476,6 +490,7 @@ files:
|
|
476
490
|
- lib/bridgetown-core/filters/date_filters.rb
|
477
491
|
- lib/bridgetown-core/filters/from_liquid.rb
|
478
492
|
- lib/bridgetown-core/filters/grouping_filters.rb
|
493
|
+
- lib/bridgetown-core/filters/translation_filters.rb
|
479
494
|
- lib/bridgetown-core/filters/url_filters.rb
|
480
495
|
- lib/bridgetown-core/frontmatter_defaults.rb
|
481
496
|
- lib/bridgetown-core/generated_page.rb
|
@@ -483,6 +498,7 @@ files:
|
|
483
498
|
- lib/bridgetown-core/generators/prototype_generator.rb
|
484
499
|
- lib/bridgetown-core/helpers.rb
|
485
500
|
- lib/bridgetown-core/hooks.rb
|
501
|
+
- lib/bridgetown-core/kramdown/parser/gfm.rb
|
486
502
|
- lib/bridgetown-core/layout.rb
|
487
503
|
- lib/bridgetown-core/liquid_extensions.rb
|
488
504
|
- lib/bridgetown-core/liquid_renderer.rb
|
@@ -499,7 +515,6 @@ files:
|
|
499
515
|
- lib/bridgetown-core/model/repo_origin.rb
|
500
516
|
- lib/bridgetown-core/plugin.rb
|
501
517
|
- lib/bridgetown-core/plugin_manager.rb
|
502
|
-
- lib/bridgetown-core/publisher.rb
|
503
518
|
- lib/bridgetown-core/rack/boot.rb
|
504
519
|
- lib/bridgetown-core/rack/logger.rb
|
505
520
|
- lib/bridgetown-core/rack/roda.rb
|
@@ -570,6 +585,7 @@ files:
|
|
570
585
|
- lib/site_template/config/puma.rb
|
571
586
|
- lib/site_template/frontend/javascript/index.js.erb
|
572
587
|
- lib/site_template/frontend/styles/index.css
|
588
|
+
- lib/site_template/frontend/styles/syntax-highlighting.css
|
573
589
|
- lib/site_template/package.json.erb
|
574
590
|
- lib/site_template/plugins/builders/.keep
|
575
591
|
- lib/site_template/plugins/site_builder.rb
|
@@ -578,6 +594,7 @@ files:
|
|
578
594
|
- lib/site_template/server/roda_app.rb
|
579
595
|
- lib/site_template/server/routes/hello.rb.sample
|
580
596
|
- lib/site_template/src/404.html
|
597
|
+
- lib/site_template/src/500.html
|
581
598
|
- lib/site_template/src/_data/site_metadata.yml
|
582
599
|
- lib/site_template/src/_posts/0000-00-00-welcome-to-bridgetown.md.erb
|
583
600
|
- lib/site_template/src/about.md
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bridgetown
|
4
|
-
class Publisher
|
5
|
-
# @param site [Bridgetown::Site]
|
6
|
-
def initialize(site)
|
7
|
-
@site = site
|
8
|
-
end
|
9
|
-
|
10
|
-
def publish?(thing)
|
11
|
-
can_be_published?(thing) && !hidden_in_the_future?(thing)
|
12
|
-
end
|
13
|
-
|
14
|
-
def hidden_in_the_future?(thing)
|
15
|
-
return false unless thing.respond_to?(:date)
|
16
|
-
|
17
|
-
future_allowed =
|
18
|
-
(thing.respond_to?(:collection) && thing.collection.metadata.future) || @site.config.future
|
19
|
-
thing_time = thing.date.is_a?(Date) ? thing.date.to_time.to_i : thing.date.to_i
|
20
|
-
!future_allowed && thing_time > @site.time.to_i
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def can_be_published?(thing)
|
26
|
-
thing.data.fetch("published", true) || @site.config.unpublished
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|