railspress-engine 1.4.0 → 1.4.1
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/README.md +25 -0
- data/lib/generators/railspress/install/templates/initializer.rb +6 -0
- data/lib/railspress/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4832e9331e7dd8cd0c22cfcff629686af94a9320f528c618b3b186e25661856e
|
|
4
|
+
data.tar.gz: 73e508e5a8746f2f20c0aec946741eae5f3e774791cccc4aa9ab1636b7471517
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3f106699162ca08c399b2026a6d688884baa12b51662e364148a2c551898f3cd63a0ffa45f1e23f32a2cf98cfb5a34f111161d6194466b33da5e82898b46ff9
|
|
7
|
+
data.tar.gz: bbadd8b060ec358f648fe79ddaf10dd4f2c1f7b03dcfcae0e8fc6da0ada6a8a46557c64fe256e8eda79703d2911c404fadec90e95ba79892270faacecb5318c4
|
data/README.md
CHANGED
|
@@ -92,6 +92,31 @@ rails action_text:install
|
|
|
92
92
|
rails active_storage:install
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
+
### Image variants
|
|
96
|
+
|
|
97
|
+
RailsPress can generate resized image variants for post header images and image helpers. Active Storage needs an image processor for this; RailsPress does not install one for your application.
|
|
98
|
+
|
|
99
|
+
Choose one processor and add the corresponding gems to your application's `Gemfile`:
|
|
100
|
+
|
|
101
|
+
```ruby
|
|
102
|
+
# Recommended for new Rails 8.1+ applications
|
|
103
|
+
gem "image_processing", "~> 2.0"
|
|
104
|
+
gem "ruby-vips", "~> 2.0"
|
|
105
|
+
|
|
106
|
+
# Or use ImageMagick instead
|
|
107
|
+
# gem "image_processing", "~> 2.0"
|
|
108
|
+
# gem "mini_magick", "~> 5.0"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Install the matching system library in every environment where variants are generated: [libvips](https://www.libvips.org/) for `ruby-vips`, or [ImageMagick](https://imagemagick.org/) for `mini_magick`. If your app uses ImageMagick, select it explicitly:
|
|
112
|
+
|
|
113
|
+
```ruby
|
|
114
|
+
# config/application.rb
|
|
115
|
+
config.active_storage.variant_processor = :mini_magick
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Use `:vips` instead if you need to select libvips explicitly. RailsPress header images can be displayed without variants; this setup is required when your application requests resizing or format conversion.
|
|
119
|
+
|
|
95
120
|
Add to your Gemfile:
|
|
96
121
|
|
|
97
122
|
```ruby
|
|
@@ -7,9 +7,15 @@ Railspress.configure do |config|
|
|
|
7
7
|
# Uncomment to enable:
|
|
8
8
|
# config.enable_authors
|
|
9
9
|
# config.author_class_name = "User"
|
|
10
|
+
# config.author_scope = :admins
|
|
10
11
|
# config.current_author_method = :current_user
|
|
11
12
|
# config.current_author_proc = -> { Current.user }
|
|
12
13
|
|
|
14
|
+
# Header images for Posts
|
|
15
|
+
# Uncomment to enable:
|
|
16
|
+
# config.enable_post_images
|
|
17
|
+
# config.enable_focal_points
|
|
18
|
+
|
|
13
19
|
# === CMS Content Elements (opt-in) ===
|
|
14
20
|
# Adds content groups, content elements, and the cms_element/cms_value
|
|
15
21
|
# view helpers for managing structured content on your site.
|
data/lib/railspress/version.rb
CHANGED