bridgetown-core 0.19.1 → 0.21.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/bridgetown-core.gemspec +3 -4
  3. data/lib/bridgetown-core.rb +32 -16
  4. data/lib/bridgetown-core/cleaner.rb +7 -1
  5. data/lib/bridgetown-core/collection.rb +176 -77
  6. data/lib/bridgetown-core/commands/apply.rb +4 -3
  7. data/lib/bridgetown-core/commands/base.rb +9 -0
  8. data/lib/bridgetown-core/commands/build.rb +0 -11
  9. data/lib/bridgetown-core/commands/configure.rb +66 -0
  10. data/lib/bridgetown-core/commands/console.rb +4 -0
  11. data/lib/bridgetown-core/commands/doctor.rb +1 -19
  12. data/lib/bridgetown-core/commands/new.rb +8 -0
  13. data/lib/bridgetown-core/commands/plugins.rb +1 -0
  14. data/lib/bridgetown-core/commands/serve.rb +0 -14
  15. data/lib/bridgetown-core/component.rb +178 -0
  16. data/lib/bridgetown-core/concerns/data_accessible.rb +1 -0
  17. data/lib/bridgetown-core/concerns/front_matter_importer.rb +52 -0
  18. data/lib/bridgetown-core/concerns/site/configurable.rb +7 -3
  19. data/lib/bridgetown-core/concerns/site/content.rb +56 -15
  20. data/lib/bridgetown-core/concerns/site/processable.rb +1 -0
  21. data/lib/bridgetown-core/concerns/site/renderable.rb +26 -0
  22. data/lib/bridgetown-core/concerns/site/writable.rb +12 -2
  23. data/lib/bridgetown-core/concerns/validatable.rb +1 -4
  24. data/lib/bridgetown-core/configuration.rb +50 -29
  25. data/lib/bridgetown-core/configurations/.keep +0 -0
  26. data/lib/bridgetown-core/configurations/bt-postcss.rb +26 -0
  27. data/lib/bridgetown-core/configurations/bt-postcss/postcss.config.js +21 -0
  28. data/lib/bridgetown-core/configurations/minitesting.rb +95 -0
  29. data/lib/bridgetown-core/configurations/netlify.rb +6 -0
  30. data/lib/bridgetown-core/configurations/netlify/netlify.sh +14 -0
  31. data/lib/bridgetown-core/configurations/netlify/netlify.toml +44 -0
  32. data/lib/bridgetown-core/configurations/purgecss.rb +49 -0
  33. data/lib/bridgetown-core/configurations/stimulus.rb +49 -0
  34. data/lib/bridgetown-core/configurations/swup.rb +37 -0
  35. data/lib/bridgetown-core/configurations/tailwindcss.rb +29 -0
  36. data/lib/bridgetown-core/configurations/tailwindcss/css_imports.css +4 -0
  37. data/lib/bridgetown-core/configurations/tailwindcss/postcss.config.js +12 -0
  38. data/lib/bridgetown-core/configurations/turbo.rb +16 -0
  39. data/lib/bridgetown-core/converter.rb +23 -0
  40. data/lib/bridgetown-core/converters/erb_templates.rb +50 -41
  41. data/lib/bridgetown-core/converters/identity.rb +0 -9
  42. data/lib/bridgetown-core/converters/markdown.rb +14 -4
  43. data/lib/bridgetown-core/converters/markdown/kramdown_parser.rb +5 -38
  44. data/lib/bridgetown-core/converters/ruby_templates.rb +17 -0
  45. data/lib/bridgetown-core/converters/smartypants.rb +3 -1
  46. data/lib/bridgetown-core/current.rb +10 -0
  47. data/lib/bridgetown-core/document.rb +7 -14
  48. data/lib/bridgetown-core/drops/collection_drop.rb +1 -1
  49. data/lib/bridgetown-core/drops/page_drop.rb +4 -0
  50. data/lib/bridgetown-core/drops/relations_drop.rb +23 -0
  51. data/lib/bridgetown-core/drops/resource_drop.rb +83 -0
  52. data/lib/bridgetown-core/drops/site_drop.rb +33 -8
  53. data/lib/bridgetown-core/drops/unified_payload_drop.rb +5 -0
  54. data/lib/bridgetown-core/entry_filter.rb +12 -25
  55. data/lib/bridgetown-core/errors.rb +0 -2
  56. data/lib/bridgetown-core/filters.rb +4 -27
  57. data/lib/bridgetown-core/filters/from_liquid.rb +23 -0
  58. data/lib/bridgetown-core/filters/url_filters.rb +12 -0
  59. data/lib/bridgetown-core/generator.rb +2 -1
  60. data/lib/bridgetown-core/generators/prototype_generator.rb +37 -19
  61. data/lib/bridgetown-core/helpers.rb +48 -9
  62. data/lib/bridgetown-core/layout.rb +28 -13
  63. data/lib/bridgetown-core/liquid_renderer/file.rb +1 -0
  64. data/lib/bridgetown-core/liquid_renderer/table.rb +1 -0
  65. data/lib/bridgetown-core/model/base.rb +138 -0
  66. data/lib/bridgetown-core/model/builder_origin.rb +40 -0
  67. data/lib/bridgetown-core/model/origin.rb +38 -0
  68. data/lib/bridgetown-core/model/repo_origin.rb +126 -0
  69. data/lib/bridgetown-core/page.rb +11 -2
  70. data/lib/bridgetown-core/plugin.rb +2 -26
  71. data/lib/bridgetown-core/plugin_manager.rb +1 -3
  72. data/lib/bridgetown-core/publisher.rb +7 -1
  73. data/lib/bridgetown-core/reader.rb +36 -21
  74. data/lib/bridgetown-core/readers/data_reader.rb +4 -4
  75. data/lib/bridgetown-core/readers/page_reader.rb +1 -0
  76. data/lib/bridgetown-core/readers/post_reader.rb +5 -4
  77. data/lib/bridgetown-core/regenerator.rb +8 -1
  78. data/lib/bridgetown-core/related_posts.rb +5 -5
  79. data/lib/bridgetown-core/renderer.rb +6 -13
  80. data/lib/bridgetown-core/resource/base.rb +317 -0
  81. data/lib/bridgetown-core/resource/destination.rb +49 -0
  82. data/lib/bridgetown-core/resource/permalink_processor.rb +179 -0
  83. data/lib/bridgetown-core/resource/relations.rb +132 -0
  84. data/lib/bridgetown-core/resource/taxonomy_term.rb +34 -0
  85. data/lib/bridgetown-core/resource/taxonomy_type.rb +56 -0
  86. data/lib/bridgetown-core/resource/transformer.rb +175 -0
  87. data/lib/bridgetown-core/ruby_template_view.rb +12 -4
  88. data/lib/bridgetown-core/site.rb +9 -1
  89. data/lib/bridgetown-core/static_file.rb +33 -10
  90. data/lib/bridgetown-core/tags/include.rb +1 -1
  91. data/lib/bridgetown-core/tags/post_url.rb +2 -2
  92. data/lib/bridgetown-core/url.rb +1 -0
  93. data/lib/bridgetown-core/utils.rb +49 -43
  94. data/lib/bridgetown-core/utils/require_gems.rb +60 -0
  95. data/lib/bridgetown-core/utils/ruby_exec.rb +6 -9
  96. data/lib/bridgetown-core/utils/ruby_front_matter.rb +39 -0
  97. data/lib/bridgetown-core/version.rb +2 -2
  98. data/lib/bridgetown-core/watcher.rb +1 -1
  99. data/lib/site_template/README.md +70 -0
  100. data/lib/site_template/package.json.erb +2 -2
  101. data/lib/site_template/src/_posts/0000-00-00-welcome-to-bridgetown.md.erb +1 -1
  102. data/lib/site_template/webpack.config.js.erb +26 -6
  103. metadata +56 -44
  104. data/lib/bridgetown-core/external.rb +0 -58
  105. data/lib/bridgetown-core/page_without_a_file.rb +0 -17
  106. data/lib/bridgetown-core/path_manager.rb +0 -31
  107. data/lib/bridgetown-core/readers/collection_reader.rb +0 -23
  108. data/lib/bridgetown-core/readers/static_file_reader.rb +0 -25
  109. data/lib/bridgetown-core/utils/exec.rb +0 -26
  110. data/lib/bridgetown-core/utils/internet.rb +0 -37
  111. data/lib/bridgetown-core/utils/platforms.rb +0 -80
  112. data/lib/bridgetown-core/utils/thread_event.rb +0 -31
  113. data/lib/bridgetown-core/utils/win_tz.rb +0 -75
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bridgetown
4
- VERSION = "0.19.1"
5
- CODE_NAME = "Arbor Lodge"
4
+ VERSION = "0.21.0.beta2"
5
+ CODE_NAME = "Broughton Beach"
6
6
  end
@@ -140,7 +140,7 @@ module Bridgetown
140
140
  if options[:trace]
141
141
  Bridgetown.logger.info e.backtrace.join("\n")
142
142
  else
143
- Bridgetown.logger.warn "Error:", "Use the --trace option for more information."
143
+ Bridgetown.logger.warn "Backtrace:", "Use the --trace option for more information."
144
144
  end
145
145
  end
146
146
  Bridgetown.logger.info ""
@@ -0,0 +1,70 @@
1
+ # Bridgetown Website README
2
+
3
+ Welcome to your new Bridgetown website! You can update this README file to provide additional context and setup information for yourself or other contributors.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Prerequisites](#prerequisites)
8
+ - [Install](#install)
9
+ - [Development](#development)
10
+ - [Commands](#commands)
11
+ - [Deployment](#deployment)
12
+ - [Contributing](#contributing)
13
+
14
+ ## Prerequisites
15
+
16
+ - [GCC](https://gcc.gnu.org/install/)
17
+ - [Make](https://www.gnu.org/software/make/)
18
+ - [Ruby](https://www.ruby-lang.org/en/downloads/)
19
+ - `>= 2.5`
20
+ - [Bridgetown Gem](https://rubygems.org/gems/bridgetown)
21
+ - `gem install bundler bridgetown -N`
22
+ - [Node](https://nodejs.org)
23
+ - `>= 10.13`
24
+ - [Yarn](https://yarnpkg.com)
25
+
26
+ ## Install
27
+
28
+ ```sh
29
+ cd bridgetown-site-folder
30
+ bundle install && yarn install
31
+ ```
32
+ > Learn more: [Bridgetown Getting Started Documentation](https://www.bridgetownrb.com/docs/).
33
+
34
+ ## Development
35
+
36
+ To start your site in development mode, run `yarn start` and navigate to [localhost:4000](https://localhost:4000/)!
37
+
38
+ Use a [theme](https://github.com/topics/bridgetown-theme), add some [plugins](https://www.bridgetownrb.com/plugins/), and/or run some [automations](https://github.com/topics/bridgetown-automation) to get started quickly.
39
+
40
+ ### Commands
41
+
42
+ ```sh
43
+ # running locally
44
+ yarn start
45
+
46
+ # build & deploy to production
47
+ yarn deploy
48
+
49
+ # load the site up within a Ruby console (IRB)
50
+ bundle exec bridgetown console
51
+ ```
52
+
53
+ > Learn more: [Bridgetown CLI Documentation](https://www.bridgetownrb.com/docs/command-line-usage)
54
+
55
+ ## Deployment
56
+
57
+ You can deploy Bridgetown sites on "Jamstack" hosts (Netlify, Vercel, Render, etc.) or virtually any tranditional web server by simply building and copying the output folder to your HTML root.
58
+
59
+ > Read the [Bridgetown Deployment Documentation](https://www.bridgetownrb.com/docs/deployment) for more information.
60
+
61
+ ## Contributing
62
+
63
+ If repo is on GitHub:
64
+
65
+ 1. Fork it
66
+ 2. Clone the fork using `git clone` to your local development machine.
67
+ 3. Create your feature branch (`git checkout -b my-new-feature`)
68
+ 4. Commit your changes (`git commit -am 'Add some feature'`)
69
+ 5. Push to the branch (`git push origin my-new-feature`)
70
+ 6. Create a new Pull Request
@@ -30,8 +30,8 @@
30
30
  "postcss-loader": "^4.1.0",
31
31
  "postcss-preset-env": "^6.7.0",
32
32
  <% else %>
33
- "node-sass": "^4.13.1",
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).
@@ -3,7 +3,9 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3
3
  const ManifestPlugin = require("webpack-manifest-plugin");
4
4
 
5
5
  module.exports = {
6
- entry: "./frontend/javascript/index.js",
6
+ entry: {
7
+ main: "./frontend/javascript/index.js"
8
+ },
7
9
  devtool: "source-map",
8
10
  // Set some or all of these to true if you want more verbose logging:
9
11
  stats: {
@@ -14,7 +16,7 @@ module.exports = {
14
16
  },
15
17
  output: {
16
18
  path: path.resolve(__dirname, "output", "_bridgetown", "static", "js"),
17
- filename: "all.[contenthash].js",
19
+ filename: "[name].[contenthash].js",
18
20
  },
19
21
  resolve: {
20
22
  extensions: [".js", ".jsx"],
@@ -29,7 +31,7 @@ module.exports = {
29
31
  },
30
32
  plugins: [
31
33
  new MiniCssExtractPlugin({
32
- filename: "../css/all.[contenthash].css",
34
+ filename: "../css/[name].[contenthash].css",
33
35
  }),
34
36
  new ManifestPlugin({
35
37
  fileName: path.resolve(__dirname, ".bridgetown-webpack", "manifest.json"),
@@ -64,22 +66,30 @@ module.exports = {
64
66
  {
65
67
  loader: "css-loader",
66
68
  options: {
69
+ url: url => !url.startsWith('/'),
67
70
  importLoaders: 1
68
71
  }
69
72
  },
70
73
  "postcss-loader"
71
74
  ],
72
- },
75
+ },
73
76
  <% else %>
74
77
  {
75
78
  test: /\.(s[ac]|c)ss$/,
76
79
  use: [
77
80
  MiniCssExtractPlugin.loader,
78
- "css-loader",
81
+ {
82
+ loader: "css-loader",
83
+ options: {
84
+ url: url => !url.startsWith('/')
85
+ }
86
+ },
79
87
  {
80
88
  loader: "sass-loader",
81
89
  options: {
90
+ implementation: require("sass"),
82
91
  sassOptions: {
92
+ fiber: false,
83
93
  includePaths: [
84
94
  path.resolve(__dirname, "src/_components")
85
95
  ],
@@ -90,13 +100,23 @@ module.exports = {
90
100
  },
91
101
  <% end %>
92
102
  {
93
- test: /\.woff2?$|\.ttf$|\.eot$|\.svg$/,
103
+ test: /\.woff2?$|\.ttf$|\.eot$/,
94
104
  loader: "file-loader",
95
105
  options: {
106
+ name: "[name]-[contenthash].[ext]",
96
107
  outputPath: "../fonts",
97
108
  publicPath: "../fonts",
98
109
  },
99
110
  },
111
+ {
112
+ test: /\.png?$|\.gif$|\.jpg$|\.svg$/,
113
+ loader: "file-loader",
114
+ options: {
115
+ name: "[path][name]-[contenthash].[ext]",
116
+ outputPath: "../",
117
+ publicPath: "../",
118
+ },
119
+ },
100
120
  ],
101
121
  },
102
122
  };
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.1
4
+ version: 0.21.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: 2020-12-26 00:00:00.000000000 Z
11
+ date: 2021-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activemodel
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '6.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '6.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: activesupport
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +184,14 @@ dependencies:
170
184
  requirements:
171
185
  - - "~>"
172
186
  - !ruby/object:Gem::Version
173
- version: '4.0'
187
+ version: '5.0'
174
188
  type: :runtime
175
189
  prerelease: false
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
192
  - - "~>"
179
193
  - !ruby/object:Gem::Version
180
- version: '4.0'
194
+ version: '5.0'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: liquid-component
183
197
  requirement: !ruby/object:Gem::Requirement
@@ -192,20 +206,6 @@ dependencies:
192
206
  - - ">="
193
207
  - !ruby/object:Gem::Version
194
208
  version: '0.1'
195
- - !ruby/object:Gem::Dependency
196
- name: liquid-render-tag
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: '0.2'
202
- type: :runtime
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - "~>"
207
- - !ruby/object:Gem::Version
208
- version: '0.2'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: listen
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -220,20 +220,6 @@ dependencies:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
222
  version: '3.0'
223
- - !ruby/object:Gem::Dependency
224
- name: pathutil
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - "~>"
228
- - !ruby/object:Gem::Version
229
- version: '0.9'
230
- type: :runtime
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - "~>"
235
- - !ruby/object:Gem::Version
236
- version: '0.9'
237
223
  - !ruby/object:Gem::Dependency
238
224
  name: rouge
239
225
  requirement: !ruby/object:Gem::Requirement
@@ -282,14 +268,14 @@ dependencies:
282
268
  requirements:
283
269
  - - "~>"
284
270
  - !ruby/object:Gem::Version
285
- version: '1.0'
271
+ version: '1.1'
286
272
  type: :runtime
287
273
  prerelease: false
288
274
  version_requirements: !ruby/object:Gem::Requirement
289
275
  requirements:
290
276
  - - "~>"
291
277
  - !ruby/object:Gem::Version
292
- version: '1.0'
278
+ version: '1.1'
293
279
  - !ruby/object:Gem::Dependency
294
280
  name: tilt
295
281
  requirement: !ruby/object:Gem::Requirement
@@ -342,6 +328,7 @@ files:
342
328
  - lib/bridgetown-core/commands/concerns/build_options.rb
343
329
  - lib/bridgetown-core/commands/concerns/configuration_overridable.rb
344
330
  - lib/bridgetown-core/commands/concerns/summarizable.rb
331
+ - lib/bridgetown-core/commands/configure.rb
345
332
  - lib/bridgetown-core/commands/console.rb
346
333
  - lib/bridgetown-core/commands/doctor.rb
347
334
  - lib/bridgetown-core/commands/new.rb
@@ -349,7 +336,9 @@ files:
349
336
  - lib/bridgetown-core/commands/registrations.rb
350
337
  - lib/bridgetown-core/commands/serve.rb
351
338
  - lib/bridgetown-core/commands/serve/servlet.rb
339
+ - lib/bridgetown-core/component.rb
352
340
  - lib/bridgetown-core/concerns/data_accessible.rb
341
+ - lib/bridgetown-core/concerns/front_matter_importer.rb
353
342
  - lib/bridgetown-core/concerns/layout_placeable.rb
354
343
  - lib/bridgetown-core/concerns/liquid_renderable.rb
355
344
  - lib/bridgetown-core/concerns/publishable.rb
@@ -362,13 +351,29 @@ files:
362
351
  - lib/bridgetown-core/concerns/site/writable.rb
363
352
  - lib/bridgetown-core/concerns/validatable.rb
364
353
  - lib/bridgetown-core/configuration.rb
354
+ - lib/bridgetown-core/configurations/.keep
355
+ - lib/bridgetown-core/configurations/bt-postcss.rb
356
+ - lib/bridgetown-core/configurations/bt-postcss/postcss.config.js
357
+ - lib/bridgetown-core/configurations/minitesting.rb
358
+ - lib/bridgetown-core/configurations/netlify.rb
359
+ - lib/bridgetown-core/configurations/netlify/netlify.sh
360
+ - lib/bridgetown-core/configurations/netlify/netlify.toml
361
+ - lib/bridgetown-core/configurations/purgecss.rb
362
+ - lib/bridgetown-core/configurations/stimulus.rb
363
+ - lib/bridgetown-core/configurations/swup.rb
364
+ - lib/bridgetown-core/configurations/tailwindcss.rb
365
+ - lib/bridgetown-core/configurations/tailwindcss/css_imports.css
366
+ - lib/bridgetown-core/configurations/tailwindcss/postcss.config.js
367
+ - lib/bridgetown-core/configurations/turbo.rb
365
368
  - lib/bridgetown-core/converter.rb
366
369
  - lib/bridgetown-core/converters/erb_templates.rb
367
370
  - lib/bridgetown-core/converters/identity.rb
368
371
  - lib/bridgetown-core/converters/liquid_templates.rb
369
372
  - lib/bridgetown-core/converters/markdown.rb
370
373
  - lib/bridgetown-core/converters/markdown/kramdown_parser.rb
374
+ - lib/bridgetown-core/converters/ruby_templates.rb
371
375
  - lib/bridgetown-core/converters/smartypants.rb
376
+ - lib/bridgetown-core/current.rb
372
377
  - lib/bridgetown-core/deprecator.rb
373
378
  - lib/bridgetown-core/document.rb
374
379
  - lib/bridgetown-core/drops/bridgetown_drop.rb
@@ -377,6 +382,8 @@ files:
377
382
  - lib/bridgetown-core/drops/drop.rb
378
383
  - lib/bridgetown-core/drops/excerpt_drop.rb
379
384
  - lib/bridgetown-core/drops/page_drop.rb
385
+ - lib/bridgetown-core/drops/relations_drop.rb
386
+ - lib/bridgetown-core/drops/resource_drop.rb
380
387
  - lib/bridgetown-core/drops/site_drop.rb
381
388
  - lib/bridgetown-core/drops/static_file_drop.rb
382
389
  - lib/bridgetown-core/drops/unified_payload_drop.rb
@@ -384,10 +391,10 @@ files:
384
391
  - lib/bridgetown-core/entry_filter.rb
385
392
  - lib/bridgetown-core/errors.rb
386
393
  - lib/bridgetown-core/excerpt.rb
387
- - lib/bridgetown-core/external.rb
388
394
  - lib/bridgetown-core/filters.rb
389
395
  - lib/bridgetown-core/filters/condition_helpers.rb
390
396
  - lib/bridgetown-core/filters/date_filters.rb
397
+ - lib/bridgetown-core/filters/from_liquid.rb
391
398
  - lib/bridgetown-core/filters/grouping_filters.rb
392
399
  - lib/bridgetown-core/filters/url_filters.rb
393
400
  - lib/bridgetown-core/frontmatter_defaults.rb
@@ -404,24 +411,31 @@ files:
404
411
  - lib/bridgetown-core/log_adapter.rb
405
412
  - lib/bridgetown-core/log_writer.rb
406
413
  - lib/bridgetown-core/mime.types
414
+ - lib/bridgetown-core/model/base.rb
415
+ - lib/bridgetown-core/model/builder_origin.rb
416
+ - lib/bridgetown-core/model/origin.rb
417
+ - lib/bridgetown-core/model/repo_origin.rb
407
418
  - lib/bridgetown-core/page.rb
408
- - lib/bridgetown-core/page_without_a_file.rb
409
- - lib/bridgetown-core/path_manager.rb
410
419
  - lib/bridgetown-core/plugin.rb
411
420
  - lib/bridgetown-core/plugin_manager.rb
412
421
  - lib/bridgetown-core/publisher.rb
413
422
  - lib/bridgetown-core/reader.rb
414
- - lib/bridgetown-core/readers/collection_reader.rb
415
423
  - lib/bridgetown-core/readers/data_reader.rb
416
424
  - lib/bridgetown-core/readers/defaults_reader.rb
417
425
  - lib/bridgetown-core/readers/layout_reader.rb
418
426
  - lib/bridgetown-core/readers/page_reader.rb
419
427
  - lib/bridgetown-core/readers/plugin_content_reader.rb
420
428
  - lib/bridgetown-core/readers/post_reader.rb
421
- - lib/bridgetown-core/readers/static_file_reader.rb
422
429
  - lib/bridgetown-core/regenerator.rb
423
430
  - lib/bridgetown-core/related_posts.rb
424
431
  - lib/bridgetown-core/renderer.rb
432
+ - lib/bridgetown-core/resource/base.rb
433
+ - lib/bridgetown-core/resource/destination.rb
434
+ - lib/bridgetown-core/resource/permalink_processor.rb
435
+ - lib/bridgetown-core/resource/relations.rb
436
+ - lib/bridgetown-core/resource/taxonomy_term.rb
437
+ - lib/bridgetown-core/resource/taxonomy_type.rb
438
+ - lib/bridgetown-core/resource/transformer.rb
425
439
  - lib/bridgetown-core/ruby_template_view.rb
426
440
  - lib/bridgetown-core/site.rb
427
441
  - lib/bridgetown-core/static_file.rb
@@ -438,16 +452,14 @@ files:
438
452
  - lib/bridgetown-core/url.rb
439
453
  - lib/bridgetown-core/utils.rb
440
454
  - lib/bridgetown-core/utils/ansi.rb
441
- - lib/bridgetown-core/utils/exec.rb
442
- - lib/bridgetown-core/utils/internet.rb
443
- - lib/bridgetown-core/utils/platforms.rb
455
+ - lib/bridgetown-core/utils/require_gems.rb
444
456
  - lib/bridgetown-core/utils/ruby_exec.rb
445
- - lib/bridgetown-core/utils/thread_event.rb
446
- - lib/bridgetown-core/utils/win_tz.rb
457
+ - lib/bridgetown-core/utils/ruby_front_matter.rb
447
458
  - lib/bridgetown-core/version.rb
448
459
  - lib/bridgetown-core/watcher.rb
449
460
  - lib/site_template/.gitignore
450
461
  - lib/site_template/Gemfile.erb
462
+ - lib/site_template/README.md
451
463
  - lib/site_template/bridgetown.config.yml
452
464
  - lib/site_template/frontend/javascript/index.js.erb
453
465
  - lib/site_template/frontend/styles/index.css
@@ -1,58 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bridgetown
4
- module External
5
- class << self
6
- #
7
- # Require a gem or file if it's present, otherwise silently fail.
8
- #
9
- # names - a string gem name or array of gem names
10
- #
11
- def require_if_present(names)
12
- Array(names).each do |name|
13
- require name
14
- rescue LoadError
15
- Bridgetown.logger.debug "Couldn't load #{name}. Skipping."
16
- yield(name, version_constraint(name)) if block_given?
17
- false
18
- end
19
- end
20
-
21
- #
22
- # The version constraint required to activate a given gem.
23
- #
24
- # Returns a String version constraint in a parseable form for
25
- # RubyGems.
26
- def version_constraint
27
- "> 0"
28
- end
29
-
30
- #
31
- # Require a gem or gems. If it's not present, show a very nice error
32
- # message that explains everything and is much more helpful than the
33
- # normal LoadError.
34
- #
35
- # names - a string gem name or array of gem names
36
- #
37
- def require_with_graceful_fail(names)
38
- Array(names).each do |name|
39
- Bridgetown.logger.debug "Requiring:", name.to_s
40
- require name
41
- rescue LoadError => e
42
- Bridgetown.logger.error "Dependency Error:", <<~MSG
43
- Yikes! It looks like you don't have #{name} or one of its dependencies installed.
44
- In order to use Bridgetown as currently configured, you'll need to install this gem.
45
-
46
- If you've run Bridgetown with `bundle exec`, ensure that you have included the #{name}
47
- gem in your Gemfile as well.
48
-
49
- The full error message from Ruby is: '#{e.message}'
50
-
51
- If you run into trouble, you can find helpful resources at https://www.bridgetownrb.com/docs/community/
52
- MSG
53
- raise Bridgetown::Errors::MissingDependencyException, name
54
- end
55
- end
56
- end
57
- end
58
- end