bridgetown-core 1.0.0.alpha11 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/bin/bridgetown +6 -1
  4. data/bridgetown-core.gemspec +3 -3
  5. data/lib/bridgetown-core/commands/base.rb +18 -18
  6. data/lib/bridgetown-core/commands/build.rb +1 -1
  7. data/lib/bridgetown-core/commands/clean.rb +2 -2
  8. data/lib/bridgetown-core/commands/esbuild/esbuild.config.js +27 -0
  9. data/lib/bridgetown-core/commands/esbuild/esbuild.defaults.js.erb +216 -0
  10. data/lib/bridgetown-core/commands/esbuild/migrate-from-webpack.rb +47 -0
  11. data/lib/bridgetown-core/commands/esbuild/setup.rb +4 -0
  12. data/lib/bridgetown-core/commands/esbuild/update.rb +4 -0
  13. data/lib/bridgetown-core/commands/esbuild.rb +83 -0
  14. data/lib/bridgetown-core/commands/new.rb +80 -10
  15. data/lib/bridgetown-core/commands/webpack/enable-postcss.rb +1 -1
  16. data/lib/bridgetown-core/commands/webpack/update.rb +3 -3
  17. data/lib/bridgetown-core/commands/webpack/webpack.defaults.js.erb +1 -1
  18. data/lib/bridgetown-core/commands/webpack.rb +3 -3
  19. data/lib/bridgetown-core/component.rb +9 -3
  20. data/lib/bridgetown-core/concerns/site/configurable.rb +4 -0
  21. data/lib/bridgetown-core/concerns/site/content.rb +4 -4
  22. data/lib/bridgetown-core/configurations/purgecss.rb +2 -1
  23. data/lib/bridgetown-core/configurations/stimulus.rb +40 -12
  24. data/lib/bridgetown-core/configurations/tailwindcss/css_imports.css +5 -0
  25. data/lib/bridgetown-core/configurations/tailwindcss.rb +31 -2
  26. data/lib/bridgetown-core/configurations/turbo/turbo_transitions.js +48 -0
  27. data/lib/bridgetown-core/configurations/turbo.rb +15 -5
  28. data/lib/bridgetown-core/converters/erb_templates.rb +1 -1
  29. data/lib/bridgetown-core/converters/ruby_templates.rb +1 -1
  30. data/lib/bridgetown-core/converters/serbea_templates.rb +1 -1
  31. data/lib/bridgetown-core/errors.rb +21 -0
  32. data/lib/bridgetown-core/helpers.rb +3 -2
  33. data/lib/bridgetown-core/model/origin.rb +4 -6
  34. data/lib/bridgetown-core/rack/boot.rb +5 -9
  35. data/lib/bridgetown-core/ruby_template_view.rb +4 -0
  36. data/lib/bridgetown-core/tags/{webpack_path.rb → asset_path.rb} +7 -9
  37. data/lib/bridgetown-core/tasks/bridgetown_tasks.rake +2 -1
  38. data/lib/bridgetown-core/utils.rb +63 -9
  39. data/lib/bridgetown-core/version.rb +1 -1
  40. data/lib/bridgetown-core/watcher.rb +34 -34
  41. data/lib/bridgetown-core.rb +1 -0
  42. data/lib/site_template/Gemfile.erb +17 -11
  43. data/lib/site_template/README.md +2 -2
  44. data/lib/site_template/{Rakefile → Rakefile.erb} +15 -0
  45. data/lib/site_template/TEMPLATES/erb/_components/shared/navbar.erb +11 -0
  46. data/lib/site_template/TEMPLATES/erb/_components/shared/navbar.rb +5 -0
  47. data/lib/site_template/TEMPLATES/erb/_layouts/default.erb +15 -0
  48. data/lib/site_template/TEMPLATES/erb/_layouts/page.erb +7 -0
  49. data/lib/site_template/TEMPLATES/erb/_layouts/post.erb +7 -0
  50. data/lib/site_template/TEMPLATES/erb/_partials/_footer.erb +3 -0
  51. data/lib/site_template/TEMPLATES/erb/_partials/_head.erb +10 -0
  52. data/lib/site_template/{src → TEMPLATES/liquid}/_components/footer.liquid +0 -0
  53. data/lib/site_template/TEMPLATES/liquid/_components/head.liquid +10 -0
  54. data/lib/site_template/TEMPLATES/liquid/_components/navbar.liquid +11 -0
  55. data/lib/site_template/{src → TEMPLATES/liquid}/_layouts/default.liquid +2 -2
  56. data/lib/site_template/{src → TEMPLATES/liquid}/_layouts/page.liquid +0 -0
  57. data/lib/site_template/{src → TEMPLATES/liquid}/_layouts/post.liquid +0 -0
  58. data/lib/site_template/TEMPLATES/serbea/_components/shared/navbar.rb +5 -0
  59. data/lib/site_template/TEMPLATES/serbea/_components/shared/navbar.serb +11 -0
  60. data/lib/site_template/TEMPLATES/serbea/_layouts/default.serb +15 -0
  61. data/lib/site_template/TEMPLATES/serbea/_layouts/page.serb +7 -0
  62. data/lib/site_template/TEMPLATES/serbea/_layouts/post.serb +7 -0
  63. data/lib/site_template/TEMPLATES/serbea/_partials/_footer.serb +3 -0
  64. data/lib/site_template/TEMPLATES/serbea/_partials/_head.serb +10 -0
  65. data/lib/site_template/frontend/javascript/index.js.erb +7 -3
  66. data/lib/site_template/frontend/styles/index.css +71 -6
  67. data/lib/site_template/package.json.erb +24 -9
  68. data/lib/site_template/ruby-version.erb +1 -0
  69. data/lib/site_template/server/roda_app.rb +5 -3
  70. data/lib/site_template/server/routes/hello.rb.sample +1 -1
  71. data/lib/site_template/src/images/logo.svg +91 -0
  72. data/lib/site_template/src/index.md.erb +22 -0
  73. data/lib/site_template/src/posts.md.erb +28 -0
  74. metadata +53 -22
  75. data/lib/bridgetown-core/configurations/swup.rb +0 -37
  76. data/lib/site_template/frontend/styles/index.scss +0 -17
  77. data/lib/site_template/src/_components/head.liquid +0 -10
  78. data/lib/site_template/src/_components/navbar.liquid +0 -5
  79. data/lib/site_template/src/_layouts/home.liquid +0 -7
  80. data/lib/site_template/src/images/.keep +0 -1
  81. data/lib/site_template/src/index.md +0 -7
  82. data/lib/site_template/src/posts.md +0 -14
@@ -1,19 +1,84 @@
1
1
  :root {
2
- --body-background: #fafafa;
3
- --body-color: #444;
2
+ --body-background: #f2f2f2;
3
+ --body-color: #444;
4
+ --heading-color: black;
5
+ --action-color: #d64045;
4
6
  }
5
7
 
6
8
  body {
7
9
  background: var(--body-background);
8
10
  color: var(--body-color);
9
- font-family: sans-serif;
11
+ font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen",
12
+ "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
13
+ "Helvetica", "Arial", sans-serif;
14
+ margin: 0 8px;
15
+ font-size: 108%;
16
+ line-height: 1.5;
10
17
  }
11
18
 
12
- h1, nav, footer {
19
+ a {
20
+ color: var(--action-color);
21
+ text-decoration: underline;
22
+ text-decoration-color: #ffb088;
23
+ }
24
+
25
+ h1 {
26
+ margin: 1rem 0 3rem;
27
+ text-align: center;
28
+ font-weight: 900;
29
+ font-size: 2.5rem;
30
+ color: var(--heading-color);
31
+ line-height: 1.2;
32
+ }
33
+
34
+ body > header {
35
+ margin: 1rem;
13
36
  text-align: center;
14
37
  }
15
38
 
39
+ body > header img {
40
+ display: inline-block;
41
+ width: 400px;
42
+ max-width: 100%;
43
+ }
44
+
45
+ body > nav ul {
46
+ margin: 2rem 0;
47
+ padding: 0;
48
+ list-style-type: none;
49
+ display: flex;
50
+ justify-content: center;
51
+ gap: 1.5rem;
52
+ font-size: 1.3rem;
53
+ font-weight: bold;
54
+ }
55
+
56
+ body > nav a {
57
+ text-decoration: none;
58
+ }
59
+
16
60
  main {
17
- margin: 4rem auto;
18
- max-width: 60rem;
61
+ margin: 2rem auto 4rem;
62
+ max-width: 65rem;
63
+ min-height: calc(100vh - 200px);
64
+ padding: 25px 25px 50px;
65
+ background: white;
66
+ box-shadow: 2px 3px 3px #ddd;
67
+ border-radius: 3px;
68
+
69
+ @media (max-width: 500px) {
70
+ padding: 16px 16px 50px;
71
+ }
72
+ }
73
+
74
+ footer {
75
+ text-align: center;
76
+ margin-bottom: 4rem;
77
+ font-size: 1em;
78
+ }
79
+
80
+ hr {
81
+ border: none;
82
+ border-top: 2px dotted #bbb;
83
+ margin: 3rem 0;
19
84
  }
@@ -3,30 +3,45 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "scripts": {
6
+ <%- if frontend_bundling_option == "esbuild" -%>
7
+ "esbuild": "node esbuild.config.js --minify",
8
+ "esbuild-dev": "node esbuild.config.js --watch"
9
+ <%- else -%>
6
10
  "webpack-build": "webpack --mode production",
7
11
  "webpack-dev": "webpack --mode development -w"
12
+ <%- end -%>
8
13
  },
9
14
  "devDependencies": {
15
+ <%- if frontend_bundling_option == "webpack" -%>
10
16
  "css-loader": "^4.3.0",
11
- "esbuild": "^0.12.7",
12
- "esbuild-loader": "^2.13.1",
17
+ <%- end -%>
18
+ "esbuild": "^0.13.15",
19
+ <%- if frontend_bundling_option == "webpack" -%>
20
+ "esbuild-loader": "^2.16.0",
13
21
  "file-loader": "^6.2.0",
14
22
  "mini-css-extract-plugin": "^1.3.1",
15
- <%- if options["use-postcss"] -%>
16
- "postcss": "^8.3.0",
17
- "postcss-flexbugs-fixes": "^4.1.0",
23
+ <%- else -%>
24
+ "glob": "^7.2.0",
25
+ <%- end -%>
26
+ <%- if postcss_option -%>
27
+ "postcss": "^8.4.0",
28
+ "postcss-flexbugs-fixes": "^5.0.2",
29
+ <%- if frontend_bundling_option == "esbuild" -%>
30
+ "postcss-import": "^14.0.2",
31
+ "postcss-load-config": "^3.1.0",
32
+ <%- else -%>
18
33
  "postcss-loader": "^4.3.0",
19
- "postcss-preset-env": "^6.7.0",
34
+ <%- end -%>
35
+ "postcss-preset-env": "^7.0.1"<%= "," if frontend_bundling_option == "webpack" %>
20
36
  <%- else -%>
21
37
  "sass": "^1.32.8",
22
38
  "sass-loader": "^8.0.2",
23
39
  <%- end -%>
40
+ <%- if frontend_bundling_option == "webpack" -%>
24
41
  "webpack": "^5.39.1",
25
42
  "webpack-cli": "^4.7.2",
26
43
  "webpack-manifest-plugin": "^3.1.1",
27
44
  "webpack-merge": "^5.8.0"
28
- },
29
- "resolutions": {
30
- "postcss-focus-within": "^4.0.0"
45
+ <%- end -%>
31
46
  }
32
47
  }
@@ -0,0 +1 @@
1
+ <%= ENV["RBENV_VERSION"] || ENV["rvm_ruby_string"] || "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}" %>
@@ -4,7 +4,8 @@
4
4
  #
5
5
  # Learn more at: http://roda.jeremyevans.net
6
6
 
7
- # Uncomment to use the file-based routing for Bridgetown SSR:
7
+ # Uncomment to use file-based dynamic routing in your project (make sure you
8
+ # uncomment the gem dependency in your Gemfile as well):
8
9
  # require "bridgetown-routes"
9
10
 
10
11
  class RodaApp < Bridgetown::Rack::Roda
@@ -12,11 +13,12 @@ class RodaApp < Bridgetown::Rack::Roda
12
13
 
13
14
  # Uncomment to use Bridgetown SSR:
14
15
  # plugin :bridgetown_ssr
16
+
17
+ # And optionally file-based routing:
15
18
  # plugin :bridgetown_routes
16
19
 
17
20
  route do |r|
18
- # Load all files in server/routes and src/_routes if "bridgetown-routes" is loaded
19
- # (see server/routes/hello.rb.sample)
21
+ # Load Roda routes in server/routes (and src/_routes via `bridgetown-routes`)
20
22
  Bridgetown::Rack::Routes.start! self
21
23
  end
22
24
  end
@@ -1,4 +1,4 @@
1
- # Rename this file to hello.rb to try out
1
+ # Rename this file to hello.rb to try it out
2
2
 
3
3
  class Routes::Hello < Bridgetown::Rack::Routes
4
4
  route do |r|
@@ -0,0 +1,91 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg width="100%" height="100%" viewBox="0 0 1863 572" version="1.1" xmlns="http://www.w3.org/2000/svg" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
4
+ <g transform="matrix(1,0,0,1,-1520.67,-710.833)">
5
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
6
+ <g transform="matrix(1,0,0,1,374.543,268.081)">
7
+ <path d="M0,13.784C1.387,13.784 2.283,12.968 2.283,11.664C2.283,10.48 1.387,9.502 0,9.502L-3.629,9.502L-3.629,13.784L0,13.784ZM-0.775,4.404C0.611,4.404 1.591,3.466 1.591,2.12C1.591,0.856 0.611,-0.122 -0.775,-0.122L-3.629,-0.122L-3.629,4.404L-0.775,4.404ZM-9.583,-5.342L0.286,-5.342C4.363,-5.342 7.626,-2.324 7.626,1.508C7.626,3.792 6.687,5.22 4.975,6.524L4.975,6.606C7.504,8.4 8.563,10.114 8.563,12.642C8.563,16.026 5.873,19.126 1.224,19.126L-9.583,19.126L-9.583,-5.342Z" style="fill:rgb(30,40,38);fill-rule:nonzero;"/>
8
+ </g>
9
+ </g>
10
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
11
+ <g transform="matrix(1,0,0,1,404.955,276.605)">
12
+ <path d="M0,-3.264C1.345,-3.264 2.242,-4.65 2.242,-6.078C2.242,-7.504 1.182,-8.77 -0.165,-8.77L-4.813,-8.77L-4.813,-3.264L0,-3.264ZM-10.808,-13.866L-0.571,-13.866C4.688,-13.866 8.114,-10.686 8.114,-6.078C8.114,-1.796 5.954,0.61 2.323,1.508L8.931,10.602L1.427,10.602L-4.813,1.468L-4.813,10.602L-10.808,10.602L-10.808,-13.866Z" style="fill:rgb(30,40,38);fill-rule:nonzero;"/>
13
+ </g>
14
+ </g>
15
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
16
+ <g transform="matrix(1,0,0,1,0,76.979)">
17
+ <rect x="424.149" y="185.76" width="5.995" height="24.468" style="fill:rgb(30,40,38);"/>
18
+ </g>
19
+ </g>
20
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
21
+ <g transform="matrix(1,0,0,1,450.609,268.203)">
22
+ <path d="M0,13.54C3.834,13.54 6.77,10.848 6.77,6.728C6.77,2.936 4.201,-0.04 0,-0.04L-2.406,-0.04L-2.406,13.54L0,13.54ZM-8.401,-5.464L0.123,-5.464C7.341,-5.464 12.928,-0.164 12.928,6.728C12.928,13.254 7.953,19.004 0.123,19.004L-8.401,19.004L-8.401,-5.464Z" style="fill:rgb(30,40,38);fill-rule:nonzero;"/>
23
+ </g>
24
+ </g>
25
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
26
+ <g transform="matrix(1,0,0,1,485.832,288.024)">
27
+ <path d="M0,-26.101C4.527,-26.101 7.667,-24.429 10.236,-21.819L6.076,-17.985C4.404,-19.495 2.325,-20.433 0,-20.433C-4.364,-20.433 -7.177,-17.171 -7.177,-13.051C-7.177,-8.525 -3.956,-5.668 0.122,-5.668C4.404,-5.668 6.484,-8.035 6.646,-10.401L-0.326,-10.401L-0.326,-15.579L13.132,-15.579L13.132,-13.255C13.132,-6.037 8.89,0 0,0C-7.748,0 -13.254,-5.75 -13.254,-13.051C-13.254,-20.351 -7.748,-26.101 0,-26.101" style="fill:rgb(30,40,38);fill-rule:nonzero;"/>
28
+ </g>
29
+ </g>
30
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
31
+ <g transform="matrix(1,0,0,1,507.961,287.207)">
32
+ <path d="M0,-24.468L16.191,-24.468L16.191,-19.168L5.995,-19.168L5.995,-14.762L15.417,-14.762L15.417,-9.542L5.995,-9.542L5.995,-5.138L16.64,-5.138L16.64,0L0,0L0,-24.468Z" style="fill:rgb(30,40,38);fill-rule:nonzero;"/>
33
+ </g>
34
+ </g>
35
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
36
+ <g transform="matrix(1,0,0,1,539.963,281.907)">
37
+ <path d="M0,-13.868L-5.464,-13.868L-5.464,-19.168L11.583,-19.168L11.583,-13.868L6.036,-13.868L6.036,5.3L0,5.3L0,-13.868Z" style="fill:rgb(30,40,38);fill-rule:nonzero;"/>
38
+ </g>
39
+ </g>
40
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
41
+ <g transform="matrix(1,0,0,1,574.253,267.591)">
42
+ <path d="M0,14.765C4.322,14.765 7.095,11.5 7.095,7.383C7.095,3.263 4.322,0 0,0C-4.364,0 -7.096,3.263 -7.096,7.383C-7.096,11.5 -4.364,14.765 0,14.765M0,-5.668C7.707,-5.668 13.172,0.082 13.172,7.383C13.172,14.683 7.707,20.433 0,20.433C-7.749,20.433 -13.173,14.683 -13.173,7.383C-13.173,0.082 -7.749,-5.668 0,-5.668" style="fill:rgb(30,40,38);fill-rule:nonzero;"/>
43
+ </g>
44
+ </g>
45
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
46
+ <g transform="matrix(1,0,0,1,595.415,288.023)">
47
+ <path d="M0,-25.284L6.28,-25.284L11.216,-13.744L14.192,-21.41L15.683,-25.284L18.842,-25.284L20.489,-21.412L23.735,-13.784L28.221,-25.284L34.461,-25.284L24.266,0L23.449,0L17.413,-14.11L11.583,0L10.808,0L0,-25.284Z" style="fill:rgb(30,40,38);fill-rule:nonzero;"/>
48
+ </g>
49
+ </g>
50
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
51
+ <g transform="matrix(1,0,0,1,639.899,287.207)">
52
+ <path d="M0,-24.468L6.322,-24.468L15.825,-9.95L15.825,-24.468L21.779,-24.468L21.779,0L15.539,0L5.995,-14.558L5.995,0L0,0L0,-24.468Z" style="fill:rgb(30,40,38);fill-rule:nonzero;"/>
53
+ </g>
54
+ </g>
55
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
56
+ <g transform="matrix(1,0,0,1,724.324,209.37)">
57
+ <path d="M0,29.41C-72.335,-66.167 -179.131,-55.549 -222.588,25.781C-227.373,34.738 -221.818,40.631 -219.109,39.985C-214.298,38.838 -197.926,32.314 -192.966,30.318C-190.894,29.485 -189.207,25.502 -187.375,21.877C-150.071,-51.956 -100.392,-60.124 -29.16,95.577C-32.607,77.837 -25.455,57.889 -2.274,37.237C0.394,34.86 2.589,32.831 0,29.41" style="fill:rgb(58,109,98);fill-rule:nonzero;"/>
58
+ </g>
59
+ </g>
60
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
61
+ <g transform="matrix(0.249711,-0.96832,-0.96832,-0.249711,486.176,197.302)">
62
+ <path d="M-12.21,-30.272C-28.365,-22.83 -44.336,-18.635 -46.819,-29.09C-48.223,-18.969 -9.68,-0.335 -12.21,21.62C-12.329,22.654 -10.713,22.914 -10.274,21.97C-1.487,3.05 -6.95,-23.042 -12.21,-30.272" style="fill:rgb(58,109,98);fill-rule:nonzero;"/>
63
+ </g>
64
+ </g>
65
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
66
+ <g transform="matrix(1,0,0,1,810.402,309.68)">
67
+ <path d="M0,-88.196C1.54,-88.196 2.104,-85.899 0.603,-85.55C-30.253,-78.37 -43.813,-48.307 -44.559,-31.561C-44.807,-26.006 -49.573,-25.025 -55.084,-22.473C-61.232,-19.625 -90.024,-7.312 -100.946,-3.404C-106.293,-1.49 -114.206,0.003 -114.576,-8.251C-116.052,-41.137 -81.521,-88.199 0,-88.196" style="fill:rgb(58,109,98);fill-rule:nonzero;"/>
68
+ </g>
69
+ </g>
70
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
71
+ <g transform="matrix(-126.776,-126.776,-126.776,126.776,684.306,302.422)">
72
+ <path d="M0.982,0.451C0.969,0.497 0.927,0.51 0.915,0.489C0.908,0.475 0.904,0.461 0.922,0.407C1.064,-0.03 0.945,-0.409 -0,-0.064C0.038,-0.102 0.068,-0.161 0.081,-0.234C0.45,-0.351 0.717,-0.297 0.868,-0.146C1.006,-0.008 1.047,0.21 0.982,0.451Z" style="fill:url(#_Linear1);fill-rule:nonzero;"/>
73
+ </g>
74
+ </g>
75
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
76
+ <g transform="matrix(0,-49.0052,-49.0052,0,756.207,273.884)">
77
+ <path d="M1,-0.813C0.989,-0.345 0.777,0.495 0.044,0.821C0.016,0.833 -0.014,0.798 0.007,0.775C0.271,0.479 0.447,0.027 0.429,-0.27C0.429,-0.28 0.427,-0.288 0.436,-0.292C0.61,-0.373 0.828,-0.554 0.969,-0.821C0.977,-0.837 1,-0.831 1,-0.814L1,-0.813Z" style="fill:url(#_Linear2);fill-rule:nonzero;"/>
78
+ </g>
79
+ </g>
80
+ <g transform="matrix(4.16667,0,0,4.16667,0,0)">
81
+ <g transform="matrix(30.5248,-8.50108,-8.50108,-30.5248,478.044,231.713)">
82
+ <path d="M0.489,-0.516C0.521,-0.344 0.815,-0.062 1.05,0.111C0.884,0.153 0.635,0.169 0.489,0.081C0.474,0.152 0.308,0.424 0.152,0.616C0.317,0.306 0.438,-0.424 0.489,-0.516Z" style="fill:url(#_Linear3);fill-rule:nonzero;"/>
83
+ </g>
84
+ </g>
85
+ </g>
86
+ <defs>
87
+ <linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,-1,0,0.100447)"><stop offset="0" style="stop-color:rgb(58,109,98);stop-opacity:1"/><stop offset="0.95" style="stop-color:rgb(44,73,73);stop-opacity:1"/><stop offset="1" style="stop-color:rgb(44,73,73);stop-opacity:1"/></linearGradient>
88
+ <linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,-1,0,-0.00347458)"><stop offset="0" style="stop-color:rgb(58,109,98);stop-opacity:1"/><stop offset="0.95" style="stop-color:rgb(44,73,73);stop-opacity:1"/><stop offset="1" style="stop-color:rgb(44,73,73);stop-opacity:1"/></linearGradient>
89
+ <linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-0.268287,-0.963339,-0.963339,0.268287,0.634136,0.481664)"><stop offset="0" style="stop-color:rgb(58,109,98);stop-opacity:1"/><stop offset="0.95" style="stop-color:rgb(44,73,73);stop-opacity:1"/><stop offset="1" style="stop-color:rgb(44,73,73);stop-opacity:1"/></linearGradient>
90
+ </defs>
91
+ </svg>
@@ -0,0 +1,22 @@
1
+ ---
2
+ # Feel free to add content and custom Front Matter to this file.
3
+
4
+ layout: default
5
+ ---
6
+
7
+ # Welcome to your new Bridgetown website.
8
+
9
+ You can learn more about how to build and deploy your new website by reading the [Bridgetown documentation](https://www.bridgetownrb.com/docs).
10
+
11
+ You can choose a [theme](https://github.com/topics/bridgetown-theme) or add some [plugins](https://www.bridgetownrb.com/plugins/) to get started quickly.
12
+
13
+ Be sure to check out the [Bridgetown Cards](https://bridgetown.cards) community site for helpful tips & tricks.
14
+
15
+ If you run into any issues or have additional questions, please join us in our [Discord chat](https://discord.gg/4E6hktQGz4) or in [GitHub discussions](https://github.com/bridgetownrb/bridgetown/discussions).
16
+
17
+ _Have fun and **good luck**!_
18
+
19
+ ----
20
+
21
+ **Generated by v<%= Bridgetown::VERSION %>**
22
+ {:style="text-align:center"}
@@ -0,0 +1,28 @@
1
+ ---
2
+ layout: page
3
+ title: Posts
4
+ ---
5
+
6
+ <ul>
7
+ <%- if options["templates"] == "erb" -%>
8
+ <%% collections.posts.resources.each do |post| %>
9
+ <li>
10
+ <a href="<%%= post.relative_url %>"><%%= post.data.title %></a>
11
+ </li>
12
+ <%% end %>
13
+ <%- elsif options["templates"] == "serbea" -%>
14
+ {% collections.posts.resources.each do |post| %}
15
+ <li>
16
+ <a href="{{ post.relative_url }}">{{ post.data.title }}</a>
17
+ </li>
18
+ {% end %}
19
+ <%- else -%>
20
+ {% for post in collections.posts.resources %}
21
+ <li>
22
+ <a href="{{ post.relative_url }}">{{ post.data.title }}</a>
23
+ </li>
24
+ {% endfor %}
25
+ <%- end -%>
26
+ </ul>
27
+
28
+ If you have a lot of posts, you may want to consider adding [pagination](https://www.bridgetownrb.com/docs/content/pagination)!
metadata CHANGED
@@ -1,43 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha11
4
+ version: 1.0.0.beta1
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-29 00:00:00.000000000 Z
11
+ date: 2022-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '6.0'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '8.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '6.0'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '8.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: activesupport
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">="
32
38
  - !ruby/object:Gem::Version
33
39
  version: '6.0'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '8.0'
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
37
46
  requirements:
38
- - - "~>"
47
+ - - ">="
39
48
  - !ruby/object:Gem::Version
40
49
  version: '6.0'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '8.0'
41
53
  - !ruby/object:Gem::Dependency
42
54
  name: addressable
43
55
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +140,14 @@ dependencies:
128
140
  requirements:
129
141
  - - "~>"
130
142
  - !ruby/object:Gem::Version
131
- version: '1.0'
143
+ version: '1.2'
132
144
  type: :runtime
133
145
  prerelease: false
134
146
  version_requirements: !ruby/object:Gem::Requirement
135
147
  requirements:
136
148
  - - "~>"
137
149
  - !ruby/object:Gem::Version
138
- version: '1.0'
150
+ version: '1.2'
139
151
  - !ruby/object:Gem::Dependency
140
152
  name: i18n
141
153
  requirement: !ruby/object:Gem::Requirement
@@ -375,6 +387,12 @@ files:
375
387
  - lib/bridgetown-core/commands/configure.rb
376
388
  - lib/bridgetown-core/commands/console.rb
377
389
  - lib/bridgetown-core/commands/doctor.rb
390
+ - lib/bridgetown-core/commands/esbuild.rb
391
+ - lib/bridgetown-core/commands/esbuild/esbuild.config.js
392
+ - lib/bridgetown-core/commands/esbuild/esbuild.defaults.js.erb
393
+ - lib/bridgetown-core/commands/esbuild/migrate-from-webpack.rb
394
+ - lib/bridgetown-core/commands/esbuild/setup.rb
395
+ - lib/bridgetown-core/commands/esbuild/update.rb
378
396
  - lib/bridgetown-core/commands/new.rb
379
397
  - lib/bridgetown-core/commands/plugins.rb
380
398
  - lib/bridgetown-core/commands/registrations.rb
@@ -420,11 +438,11 @@ files:
420
438
  - lib/bridgetown-core/configurations/render.rb
421
439
  - lib/bridgetown-core/configurations/render/render.yaml.erb
422
440
  - lib/bridgetown-core/configurations/stimulus.rb
423
- - lib/bridgetown-core/configurations/swup.rb
424
441
  - lib/bridgetown-core/configurations/tailwindcss.rb
425
442
  - lib/bridgetown-core/configurations/tailwindcss/css_imports.css
426
443
  - lib/bridgetown-core/configurations/tailwindcss/postcss.config.js
427
444
  - lib/bridgetown-core/configurations/turbo.rb
445
+ - lib/bridgetown-core/configurations/turbo/turbo_transitions.js
428
446
  - lib/bridgetown-core/converter.rb
429
447
  - lib/bridgetown-core/converters/erb_templates.rb
430
448
  - lib/bridgetown-core/converters/identity.rb
@@ -498,6 +516,7 @@ files:
498
516
  - lib/bridgetown-core/ruby_template_view.rb
499
517
  - lib/bridgetown-core/site.rb
500
518
  - lib/bridgetown-core/static_file.rb
519
+ - lib/bridgetown-core/tags/asset_path.rb
501
520
  - lib/bridgetown-core/tags/class_map.rb
502
521
  - lib/bridgetown-core/tags/find.rb
503
522
  - lib/bridgetown-core/tags/highlight.rb
@@ -506,7 +525,6 @@ files:
506
525
  - lib/bridgetown-core/tags/post_url.rb
507
526
  - lib/bridgetown-core/tags/render_content.rb
508
527
  - lib/bridgetown-core/tags/t.rb
509
- - lib/bridgetown-core/tags/webpack_path.rb
510
528
  - lib/bridgetown-core/tags/with.rb
511
529
  - lib/bridgetown-core/tasks/bridgetown_tasks.rake
512
530
  - lib/bridgetown-core/url.rb
@@ -523,34 +541,47 @@ files:
523
541
  - lib/site_template/.gitignore
524
542
  - lib/site_template/Gemfile.erb
525
543
  - lib/site_template/README.md
526
- - lib/site_template/Rakefile
544
+ - lib/site_template/Rakefile.erb
545
+ - lib/site_template/TEMPLATES/erb/_components/shared/navbar.erb
546
+ - lib/site_template/TEMPLATES/erb/_components/shared/navbar.rb
547
+ - lib/site_template/TEMPLATES/erb/_layouts/default.erb
548
+ - lib/site_template/TEMPLATES/erb/_layouts/page.erb
549
+ - lib/site_template/TEMPLATES/erb/_layouts/post.erb
550
+ - lib/site_template/TEMPLATES/erb/_partials/_footer.erb
551
+ - lib/site_template/TEMPLATES/erb/_partials/_head.erb
552
+ - lib/site_template/TEMPLATES/liquid/_components/footer.liquid
553
+ - lib/site_template/TEMPLATES/liquid/_components/head.liquid
554
+ - lib/site_template/TEMPLATES/liquid/_components/navbar.liquid
555
+ - lib/site_template/TEMPLATES/liquid/_layouts/default.liquid
556
+ - lib/site_template/TEMPLATES/liquid/_layouts/page.liquid
557
+ - lib/site_template/TEMPLATES/liquid/_layouts/post.liquid
558
+ - lib/site_template/TEMPLATES/serbea/_components/shared/navbar.rb
559
+ - lib/site_template/TEMPLATES/serbea/_components/shared/navbar.serb
560
+ - lib/site_template/TEMPLATES/serbea/_layouts/default.serb
561
+ - lib/site_template/TEMPLATES/serbea/_layouts/page.serb
562
+ - lib/site_template/TEMPLATES/serbea/_layouts/post.serb
563
+ - lib/site_template/TEMPLATES/serbea/_partials/_footer.serb
564
+ - lib/site_template/TEMPLATES/serbea/_partials/_head.serb
527
565
  - lib/site_template/bridgetown.config.yml
528
566
  - lib/site_template/config.ru
529
567
  - lib/site_template/config/puma.rb
530
568
  - lib/site_template/frontend/javascript/index.js.erb
531
569
  - lib/site_template/frontend/styles/index.css
532
- - lib/site_template/frontend/styles/index.scss
533
570
  - lib/site_template/package.json.erb
534
571
  - lib/site_template/plugins/builders/.keep
535
572
  - lib/site_template/plugins/site_builder.rb
536
573
  - lib/site_template/postcss.config.js.erb
574
+ - lib/site_template/ruby-version.erb
537
575
  - lib/site_template/server/roda_app.rb
538
576
  - lib/site_template/server/routes/hello.rb.sample
539
577
  - lib/site_template/src/404.html
540
- - lib/site_template/src/_components/footer.liquid
541
- - lib/site_template/src/_components/head.liquid
542
- - lib/site_template/src/_components/navbar.liquid
543
578
  - lib/site_template/src/_data/site_metadata.yml
544
- - lib/site_template/src/_layouts/default.liquid
545
- - lib/site_template/src/_layouts/home.liquid
546
- - lib/site_template/src/_layouts/page.liquid
547
- - lib/site_template/src/_layouts/post.liquid
548
579
  - lib/site_template/src/_posts/0000-00-00-welcome-to-bridgetown.md.erb
549
580
  - lib/site_template/src/about.md
550
581
  - lib/site_template/src/favicon.ico
551
- - lib/site_template/src/images/.keep
552
- - lib/site_template/src/index.md
553
- - lib/site_template/src/posts.md
582
+ - lib/site_template/src/images/logo.svg
583
+ - lib/site_template/src/index.md.erb
584
+ - lib/site_template/src/posts.md.erb
554
585
  homepage: https://www.bridgetownrb.com
555
586
  licenses:
556
587
  - MIT
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # rubocop:disable all
4
-
5
- packages = "swup @swup/body-class-plugin @swup/scroll-plugin @swup/fade-theme"
6
- say_status :swup, "Adding the following yarn packages: #{packages}"
7
- system("yarn add #{packages}")
8
-
9
- javascript_import do
10
- <<~JS
11
- import Swup from "swup"
12
- import SwupBodyClassPlugin from "@swup/body-class-plugin"
13
- import SwupScrollPlugin from "@swup/scroll-plugin"
14
- import SwupFadeTheme from "@swup/fade-theme"
15
- const swup = new Swup({
16
- plugins: [
17
- new SwupBodyClassPlugin(),
18
- new SwupScrollPlugin(),
19
- new SwupFadeTheme(),
20
- ]
21
- })
22
- JS
23
- end
24
-
25
- css_index = File.exist?(File.expand_path("frontend/styles/index.scss", destination_root)) ? "frontend/styles/index.scss" : "frontend/styles/index.css"
26
- append_to_file css_index do
27
- <<~CSS
28
- .swup-transition-main {
29
- transition: opacity .2s;
30
- }
31
- CSS
32
- end
33
-
34
- say_status :swup, "All done! Edit .swup-transition-main in #{css_index} if you wish to adjust the transition animation"
35
- say_status :swup, "Make sure you add id=\"swup\" to the primary container of your HTML layout (perhaps <main>)"
36
-
37
- # rubocop:enable all
@@ -1,17 +0,0 @@
1
- $body-background: #fafafa;
2
- $body-color: #444;
3
-
4
- body {
5
- background: $body-background;
6
- color: $body-color;
7
- font-family: sans-serif;
8
- }
9
-
10
- h1, nav, footer {
11
- text-align: center;
12
- }
13
-
14
- main {
15
- margin: 4rem auto;
16
- max-width: 60rem;
17
- }
@@ -1,10 +0,0 @@
1
- <meta charset="utf-8" />
2
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
3
- {% capture page_title %}{{ title | strip_html | strip_newlines }}{% endcapture %}
4
- <title>{% if page_title != "Index" %}{{ page_title | escape }} | {{ metadata.title | escape }}{% else %}{{ metadata.title | escape }}: {{ metadata.tagline | escape }}{% endif %}</title>
5
-
6
- <meta name="description" content="{{ metadata.description }}" />
7
-
8
- <link rel="stylesheet" href="{% webpack_path css %}" />
9
- <script src="{% webpack_path js %}" defer></script>
10
- {% live_reload_dev_js %}
@@ -1,5 +0,0 @@
1
- <nav>
2
- <a href="/">Home</a>
3
- <a href="/about">About</a>
4
- <a href="/posts">Posts</a>
5
- </nav>
@@ -1,7 +0,0 @@
1
- ---
2
- layout: default
3
- ---
4
-
5
- <h1>Home Page</h1>
6
-
7
- {{ content }}
@@ -1 +0,0 @@
1
-
@@ -1,7 +0,0 @@
1
- ---
2
- # Feel free to add content and custom Front Matter to this file.
3
-
4
- layout: home
5
- ---
6
-
7
- Welcome to Bridgetown!
@@ -1,14 +0,0 @@
1
- ---
2
- layout: page
3
- title: Posts
4
- ---
5
-
6
- <ul>
7
- {% for post in collections.posts.resources %}
8
- <li>
9
- <a href="{{ post.relative_url }}">{{ post.title }}</a>
10
- </li>
11
- {% endfor %}
12
- </ul>
13
-
14
- If you have a lot of posts, you may want to consider adding [pagination](https://www.bridgetownrb.com/docs/content/pagination)!