bulmatown 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -3
  3. data/README.md +95 -31
  4. data/bridgetown.automation.rb +19 -7
  5. data/bulmatown.gemspec +1 -1
  6. data/components/bulmatown/hero.scss +1 -0
  7. data/components/bulmatown/navbar.scss +4 -0
  8. data/layouts/bulmatown/{homepage.html → homepage.liquid} +0 -0
  9. data/layouts/bulmatown/{page.html → page.liquid} +0 -0
  10. data/layouts/bulmatown/{post.html → post.liquid} +0 -0
  11. data/lib/bulmatown.rb +0 -1
  12. data/lib/bulmatown/version.rb +1 -1
  13. data/package.json +1 -1
  14. metadata +7 -43
  15. data/content/bulmatown/example_page.md +0 -8
  16. data/content/bulmatown/train-on-rails.jpeg +0 -0
  17. data/example/.gitignore +0 -35
  18. data/example/Gemfile +0 -22
  19. data/example/bridgetown.config.yml +0 -26
  20. data/example/frontend/fonts/forkawesome-webfont.eot +0 -0
  21. data/example/frontend/fonts/forkawesome-webfont.svg +0 -2849
  22. data/example/frontend/fonts/forkawesome-webfont.ttf +0 -0
  23. data/example/frontend/fonts/forkawesome-webfont.woff +0 -0
  24. data/example/frontend/fonts/forkawesome-webfont.woff2 +0 -0
  25. data/example/frontend/javascript/index.js +0 -4
  26. data/example/frontend/styles/index.scss +0 -5
  27. data/example/package.json +0 -37
  28. data/example/plugins/builders/.keep +0 -0
  29. data/example/plugins/site_builder.rb +0 -4
  30. data/example/src/404.html +0 -8
  31. data/example/src/_components/footer.liquid +0 -53
  32. data/example/src/_components/head.liquid +0 -9
  33. data/example/src/_components/navbar.liquid +0 -51
  34. data/example/src/_data/authors.yml +0 -5
  35. data/example/src/_data/site_metadata.yml +0 -18
  36. data/example/src/_layouts/default.html +0 -15
  37. data/example/src/_layouts/home.html +0 -5
  38. data/example/src/_layouts/page.html +0 -5
  39. data/example/src/_layouts/post.html +0 -5
  40. data/example/src/_posts/2020-06-13-this-is-groovy.md +0 -29
  41. data/example/src/_posts/2020-06-13-welcome-to-bridgetown.md +0 -30
  42. data/example/src/about.md +0 -11
  43. data/example/src/favicon.ico +0 -0
  44. data/example/src/images/jared-white-avatar.jpg +0 -0
  45. data/example/src/index.md +0 -21
  46. data/example/src/posts.md +0 -12
  47. data/example/start.js +0 -17
  48. data/example/sync.js +0 -35
  49. data/example/webpack.config.js +0 -78
  50. data/example/yarn.lock +0 -6129
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cf33656582634a453a7e2119a081162519d60f7f6e7d3869a2df20737d8ab8c
4
- data.tar.gz: 25cd31c1d7eeb1147d4bec23a24b6fddf9988c1536cb4c98a44371a6bb6a010d
3
+ metadata.gz: f6b1bbf9cb02f2f439fe0cd0352ef94e1ce33f4cdd1b4ccff9263c3d73d8cd1e
4
+ data.tar.gz: 39e10115b969ef3f966c59f41598c2c4237fd502734d4565835a111dc066cddc
5
5
  SHA512:
6
- metadata.gz: dd1a8720b2e838b6e67d2742e9e642bd6c3dffcd59288c07e8f4165f9aa67cb4da203d5a19643b15d8d98a6fbe3f5fbc481c002433f0d9f5ddbe380c54f530cd
7
- data.tar.gz: 0ee7fac751358286b63c588bd14f82775b410d68003eb5b010593d217bf83724f815c5d55236101d652e4d5665f9429b4d6048969b19176591d62ec4c81e3827
6
+ metadata.gz: ad3829f03b11160c3d56d0ae38dd0de9fc88ca724c00453aad703225546a657795c68da6e9952646face44efe53bba97613c9358e93ab2f6052393d68829a396
7
+ data.tar.gz: ae053fe18c203ba28408dd7b15da402791a99cb049af10689cafdf4fb91500e2f24cc7b177eb6d461b73b3794dffe164d558568281bf93833da2b228af142306
data/CHANGELOG.md CHANGED
@@ -1,7 +1,18 @@
1
1
  # master
2
2
 
3
- * Use this file to keep track of plugin updates
3
+ # 1.1.0 / 2021-02-01
4
4
 
5
- # 0.1.0 / 2020-05-01
5
+ * Fix installation now that Liquid components use `.liquid` extension [#4](https://github.com/whitefusionhq/bulmatown/pull/4) ([arca0](https://github.com/arca0))
6
6
 
7
- * First version
7
+ # 1.0.7 / 2020-10-19
8
+
9
+ * Change layout files to .liquid extension for better compatibility with Bridgetown 0.18 template engine configurations
10
+
11
+ # 1.0.6 / 2020-10-02
12
+
13
+ * Remove red border from error syntax #3
14
+ * Remove italics from syntax highlighting #2
15
+
16
+ # 1.0.5 / 2020-06-27
17
+
18
+ * Wide release
data/README.md CHANGED
@@ -1,53 +1,117 @@
1
- # Sample plugin for Bridgetown
1
+ # Bulmatown
2
+ ## A Bulma CSS starter theme for Bridgetown.
2
3
 
3
- _NOTE: This isn't a real plugin! Copy this sample code and use it to create your own Ruby gem! [Help guide here…](https://www.bridgetownrb.com/docs/plugins)_ 😃
4
+ [Bulma](https://bulma.io) is a clean, modern CSS framework for rapid prototyping of content-focused websites. Use this theme to start using Bulma in your new [Bridgetown](https://www.bridgetownrb.com) site quickly, while preserving _all_ of the advanced customization possibilities as if you configured Bulma manually.
4
5
 
5
- A Bridgetown plugin to [fill in the blank]
6
+ **[LIVE DEMO](https://bulmatown.vercel.app)**
7
+
8
+ ![Bulmatown Example](https://res.cloudinary.com/mariposta/image/upload/c_thumb,w_900/v1593195961/bulmatown/bulmatown-example.jpg)
6
9
 
7
10
  ## Installation
8
11
 
9
- Run this command to add this plugin to your site's Gemfile:
12
+ Bulmatown requires Bridgetown v0.15 or later
13
+
14
+ To install Bulmatown while creating a new Bridgetown site:
15
+
16
+ ```sh
17
+ bridgetown new mysite -a https://github.com/whitefusionhq/bulmatown
18
+ ```
19
+
20
+ Or to add it to your existing Bridgetown site:
10
21
 
11
- ```shell
12
- $ bundle add my-awesome-plugin -g bridgetown_plugins
22
+ ```sh
23
+ bundle exec bridgetown apply https://github.com/whitefusionhq/bulmatown
13
24
  ```
14
25
 
26
+ A few other (optional) plugins you might be interested in installing:
27
+
28
+ * [SEO Tag](https://github.com/bridgetownrb/bridgetown-seo-tag)
29
+ * [Atom Feed](https://github.com/bridgetownrb/bridgetown-feed)
30
+ * Check out [Bridgetown community automations](https://github.com/bridgetownrb/automations) for some extra goodies like PurgeCSS, Swup page transitions, a test suite, and more!
31
+
15
32
  ## Usage
16
33
 
17
- The plugin will
34
+ The installation process will prompt you to configure your site to use Bulmatown automatically. However, if you decline those changes, you can inspect the [example site](https://github.com/whitefusionhq/bulmatown/tree/master/example) in this repository.
18
35
 
19
- ### Optional configuration options
36
+ Bulmatown comes with a few color variations out of the box. You can use the `theme_variation` Sass variable to switch the variation. For example:
20
37
 
21
- The plugin will automatically use any of the following metadata variables if they are present in your site's `_data/site_metadata.yml` file.
38
+ ```scss
39
+ // frontend/styles/index.scss
22
40
 
23
-
41
+ $theme_variation: rust;
24
42
 
25
- ## Testing
43
+ @import "~bulmatown/frontend/styles"
44
+ ```
26
45
 
27
- * Run `bundle exec rspec` to run the test suite
28
- * Or run `script/cibuild` to validate with Rubocop and test with rspec together.
46
+ The available options are:
29
47
 
30
- ## Contributing
48
+ * `default`
49
+ * `rust`
50
+ * `fuchsia`
51
+ * `fineart`
31
52
 
32
- 1. Fork it (https://github.com/username/my-awesome-plugin/fork)
33
- 2. Clone the fork using `git clone` to your local development machine.
34
- 3. Create your feature branch (`git checkout -b my-new-feature`)
35
- 4. Commit your changes (`git commit -am 'Add some feature'`)
36
- 5. Push to the branch (`git push origin my-new-feature`)
37
- 6. Create a new Pull Request
53
+ Speaking of Sass variables, you can put all your custom Bulma variables right before the `@import` statement and Bulma will pick up all the changes. You can even override any of the variables defined by Bulmatown out-of-the-box. [Read the Bulma documentation for more information.](https://bulma.io/documentation/)
38
54
 
39
- ----
55
+ ### Hero Banners and Images
40
56
 
41
- ## Releasing (you can delete this section in your own plugin repo)
57
+ Bulmatown will automatically look for `image` front matter variables in your pages and documents and display those in the hero banners and in the card component for post previews. Check out the [bridgetown-cloudinary](https://github.com/bridgetownrb/bridgetown-cloudinary) plugin for an easy way to add advanced image asset handling to your site.
42
58
 
43
- To release a new version of the plugin, simply bump up the version number in both `version.rb` and
44
- `package.json`, and then run `script/release`. This will require you to have a registered account
45
- with both the [RubyGems.org](https://rubygems.org) and [NPM](https://www.npmjs.com) registries.
46
- You can optionally remove the `package.json` and `frontend` folder if you don't need to package frontend
47
- assets for Webpack.
59
+ If you wish, you can alter which variable is loaded for the cards and social embeds vs. the hero banners using metadata:
60
+
61
+ ```yaml
62
+ # src/_data/site_metadata.yml
63
+ bulmatown_theme:
64
+ image_sizes:
65
+ embed: image
66
+ hero: image_hero
67
+ ```
48
68
 
49
- If you run into any problems or need further guidance, please check out our [Bridgetown community resources](https://www.bridgetownrb.com/docs/community)
50
- where friendly folks are standing by to help you build and release your plugin or theme.
69
+ In addition, for a fun way to add some sparkle to a hero banner with an image background, you can put `rainbow_hero: true` in your front matter to display a nice colorful gradient.
70
+
71
+ ## Authors
72
+
73
+ To show author information at the top of a blog post, add `authors.yml` to your data folder. For example:
74
+
75
+ ```yaml
76
+ # src/_data/authors.yml
77
+ jared:
78
+ name: Jared White
79
+ avatar: /images/jared-white-avatar.jpg
80
+ twitter: jaredcwhite
81
+ website: https://jaredwhite.com
82
+ ```
51
83
 
52
- **NOTE:** make sure you add the `bridgetown-plugin` [topic](https://github.com/topics/bridgetown-plugin) to your
53
- plugin's GitHub repo so the plugin or theme will show up on [Bridgetown's official Plugin Directory](https://www.bridgetownrb.com/plugins)! (There may be a day or so delay before you see it appear.)
84
+ Then simply add `author: jared` to your post's front matter.
85
+
86
+ This will link to an `/authors/<authorname>` URL. You can create a page at that URL manually, or you can auto-generate author archives using a Prototype Page. ([See this example file.](https://github.com/whitefusionhq/bulmatown/blob/master/example/src/authors/author.html))
87
+
88
+ ## Overriding Layout Templates and Components
89
+
90
+ If you ever find yourself needing to override one or more of the layout templates or Liquid components provided by Bulmatown, you can use the `bridgetown plugins cd` command to drill down into the gem and copy files out to your own site. For example:
91
+
92
+ ```sh
93
+ # copy the layouts folder:
94
+
95
+ bundle exec bridgetown plugins cd Bulmatown/layouts
96
+
97
+ cp -r bulmatown $BRIDGETOWN_SITE/src/_layouts
98
+ exit
99
+
100
+ # copy the components folder:
101
+
102
+ bundle exec bridgetown plugins cd Bulmatown/components
103
+
104
+ cp -r bulmatown $BRIDGETOWN_SITE/src/_components
105
+ exit
106
+ ```
107
+
108
+ Then you can go to the `bulmatown` folder in your layouts or components folders and make the changes from there. Or instead of wholesale copying over `bulmatown` entirely, you can pick and choose which files you want to copy.
109
+
110
+ ## Contributing
111
+
112
+ 1. Fork it (https://github.com/whitefusionhq/bulmatown/fork)
113
+ 2. Clone the fork using `git clone` to your local development machine.
114
+ 3. Create your feature branch (`git checkout -b my-new-feature`)
115
+ 4. Commit your changes (`git commit -am 'Add some feature'`)
116
+ 5. Push to the branch (`git push origin my-new-feature`)
117
+ 6. Create a new Pull Request
@@ -60,17 +60,28 @@ def add_template_repository_to_source_path
60
60
  end
61
61
  end
62
62
 
63
+ def copy_if_exists(file)
64
+ target = File.exist?("src/_layouts/#{file}.html") ? "src/_layouts/#{file}.html" : "src/_layouts/#{file}.liquid"
65
+ copy_file "example/src/_layouts/#{file}.liquid", target
66
+ end
67
+
68
+ def substitute_in_default_if_exists
69
+ if File.exists?("src/_layouts/default.liquid")
70
+ gsub_file "src/_layouts/default.liquid", '{% render "footer", ', '{% render "footer", url: site.url, '
71
+ elsif File.exists?("src/_layouts/default.html")
72
+ gsub_file "src/_layouts/default.html", '{% render "footer", ', '{% render "footer", url: site.url, '
73
+ else
74
+ say_status :bulmatown, "Could not find the default template. You will have to add the url parameter to the render command manually"
75
+ end
76
+ end
77
+
63
78
  if yes? "The Bulmatown installer can update styles, layouts, and page templates to use the new theme. You'll have the option to type 'a' to overwrite all existing files or 'd' to inspect each change. Would you like to proceed? (Y/N)"
64
79
  add_template_repository_to_source_path
65
80
 
66
81
  create_file "frontend/styles/index.scss", '@import "~bulmatown/frontend/styles"'
67
-
68
- copy_file "example/src/_layouts/home.html", "src/_layouts/home.html"
69
- copy_file "example/src/_layouts/page.html", "src/_layouts/page.html"
70
- copy_file "example/src/_layouts/post.html", "src/_layouts/post.html"
71
82
 
72
-
73
- gsub_file "src/_layouts/default.html", '{% render "footer", ', '{% render "footer", url: site.url, '
83
+ ["home", "page", "post"].each { |f| copy_if_exists(f) }
84
+ substitute_in_default_if_exists
74
85
 
75
86
  copy_file "example/src/index.md", "src/index.md"
76
87
  copy_file "example/src/posts.md", "src/posts.md"
@@ -87,10 +98,11 @@ twitter = ask "Do you have a Twitter handle? If so, enter it here, otherwise typ
87
98
  if twitter != "" && twitter != "no"
88
99
  append_to_file "src/_data/site_metadata.yml" do
89
100
  <<~YAML
101
+
90
102
  twitter: #{twitter}
91
103
 
92
104
  YAML
93
105
  end
94
106
  end
95
107
 
96
- say_status :bulmatown, "Theme installation complete! Enjoy your fresh new design :)"
108
+ say_status :bulmatown, "Theme installation complete! Enjoy your fresh new design :)"
data/bulmatown.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.homepage = "https://github.com/whitefusionhq/bulmatown"
12
12
  spec.license = "MIT"
13
13
 
14
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features|frontend)/!) }
14
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features|frontend|example)/!) }
15
15
  spec.test_files = spec.files.grep(%r!^spec/!)
16
16
  spec.require_paths = ["lib"]
17
17
  spec.metadata = { "yarn-add" => "bulmatown@#{Bulmatown::VERSION}" }
@@ -6,6 +6,7 @@ $gradient-bottom-right: transparentize(lighten(saturate(adjust-hue($dark, 10deg)
6
6
  .hero {
7
7
  background-size: cover;
8
8
  background-position: center center;
9
+ overflow: hidden;
9
10
  --overlay-center: #{$center};
10
11
  --overlay-top-left: #{$gradient-top-left};
11
12
  --overlay-bottom-right: #{$gradient-bottom-right};
@@ -18,6 +18,10 @@
18
18
  }
19
19
  }
20
20
 
21
+ .navbar-brand {
22
+ font-weight: bold;
23
+ }
24
+
21
25
  .search-item input {
22
26
  font-size: 1em;
23
27
  height: 1.5em;
File without changes
File without changes
data/lib/bulmatown.rb CHANGED
@@ -6,6 +6,5 @@ require "bulmatown/version"
6
6
  Bridgetown::PluginManager.new_source_manifest(
7
7
  origin: Bulmatown,
8
8
  components: File.expand_path("../components", __dir__),
9
- content: File.expand_path("../content", __dir__),
10
9
  layouts: File.expand_path("../layouts", __dir__)
11
10
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bulmatown
4
- VERSION = "1.0.3"
4
+ VERSION = "1.1.0"
5
5
  end
data/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bulmatown",
3
3
  "description": "A Bulma CSS starter theme for Bridgetown",
4
- "version": "1.0.3",
4
+ "version": "1.0.7",
5
5
  "main": "frontend/javascript/index.js",
6
6
  "repository": {
7
7
  "type": "git",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulmatown
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared White
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-26 00:00:00.000000000 Z
11
+ date: 2021-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridgetown
@@ -139,45 +139,9 @@ files:
139
139
  - components/bulmatown/navbar.liquid
140
140
  - components/bulmatown/navbar.scss
141
141
  - components/bulmatown/pagination.liquid
142
- - content/bulmatown/example_page.md
143
- - content/bulmatown/train-on-rails.jpeg
144
- - example/.gitignore
145
- - example/Gemfile
146
- - example/bridgetown.config.yml
147
- - example/frontend/fonts/forkawesome-webfont.eot
148
- - example/frontend/fonts/forkawesome-webfont.svg
149
- - example/frontend/fonts/forkawesome-webfont.ttf
150
- - example/frontend/fonts/forkawesome-webfont.woff
151
- - example/frontend/fonts/forkawesome-webfont.woff2
152
- - example/frontend/javascript/index.js
153
- - example/frontend/styles/index.scss
154
- - example/package.json
155
- - example/plugins/builders/.keep
156
- - example/plugins/site_builder.rb
157
- - example/src/404.html
158
- - example/src/_components/footer.liquid
159
- - example/src/_components/head.liquid
160
- - example/src/_components/navbar.liquid
161
- - example/src/_data/authors.yml
162
- - example/src/_data/site_metadata.yml
163
- - example/src/_layouts/default.html
164
- - example/src/_layouts/home.html
165
- - example/src/_layouts/page.html
166
- - example/src/_layouts/post.html
167
- - example/src/_posts/2020-06-13-this-is-groovy.md
168
- - example/src/_posts/2020-06-13-welcome-to-bridgetown.md
169
- - example/src/about.md
170
- - example/src/favicon.ico
171
- - example/src/images/jared-white-avatar.jpg
172
- - example/src/index.md
173
- - example/src/posts.md
174
- - example/start.js
175
- - example/sync.js
176
- - example/webpack.config.js
177
- - example/yarn.lock
178
- - layouts/bulmatown/homepage.html
179
- - layouts/bulmatown/page.html
180
- - layouts/bulmatown/post.html
142
+ - layouts/bulmatown/homepage.liquid
143
+ - layouts/bulmatown/page.liquid
144
+ - layouts/bulmatown/post.liquid
181
145
  - lib/bulmatown.rb
182
146
  - lib/bulmatown/version.rb
183
147
  - package.json
@@ -186,7 +150,7 @@ homepage: https://github.com/whitefusionhq/bulmatown
186
150
  licenses:
187
151
  - MIT
188
152
  metadata:
189
- yarn-add: bulmatown@1.0.3
153
+ yarn-add: bulmatown@1.1.0
190
154
  post_install_message:
191
155
  rdoc_options: []
192
156
  require_paths:
@@ -202,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
166
  - !ruby/object:Gem::Version
203
167
  version: '0'
204
168
  requirements: []
205
- rubygems_version: 3.0.6
169
+ rubygems_version: 3.1.4
206
170
  signing_key:
207
171
  specification_version: 4
208
172
  summary: A Bulma CSS starter theme for Bridgetown
@@ -1,8 +0,0 @@
1
- ---
2
- layout: default
3
- title: Example Page
4
- ---
5
-
6
- If all goes well, this page will be accessible as [`{{ page.url }}`]({{ page.url }}), and you will see a photo of a train:
7
-
8
- ![Train on Rails]({{ "/bulmatown/train-on-rails.jpeg" | relative_url }})
Binary file
data/example/.gitignore DELETED
@@ -1,35 +0,0 @@
1
- # Bridgetown
2
- output
3
- .bridgetown-cache
4
- .bridgetown-metadata
5
- .bridgetown-webpack
6
-
7
- # Dependency folders
8
- node_modules
9
- bower_components
10
- vendor
11
-
12
- # Caches
13
- .sass-cache
14
- .npm
15
- .node_repl_history
16
-
17
- # Ignore bundler config.
18
- /.bundle
19
-
20
- # Ignore Byebug command history file.
21
- .byebug_history
22
-
23
- # dotenv environment variables file
24
- .env
25
-
26
- # Mac files
27
- .DS_Store
28
-
29
- # Yarn
30
- yarn-error.log
31
- yarn-debug.log*
32
- .pnp/
33
- .pnp.js
34
- # Yarn Integrity file
35
- .yarn-integrity
data/example/Gemfile DELETED
@@ -1,22 +0,0 @@
1
- source "https://rubygems.org"
2
- git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
-
4
- # Hello! This is where you manage which Bridgetown version is used to run.
5
- # When you want to use a different version, change it below, save the
6
- # file and run `bundle install`. Run Bridgetown with `bundle exec`, like so:
7
- #
8
- # bundle exec bridgetown serve
9
- #
10
- # This will help ensure the proper Bridgetown version is running.
11
- #
12
- # To install a plugin, simply run bundle add and specify the group
13
- # "bridgetown_plugins". For example:
14
- #
15
- # bundle add some-new-plugin -g bridgetown_plugins
16
- #
17
- # Happy Bridgetowning!
18
-
19
- gem "bridgetown"
20
- gem "bridgetown-quick-search", "~> 1.0", :group => :bridgetown_plugins
21
-
22
- gem "bulmatown", group: :bridgetown_plugins