katalyst-content 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6eaf7d4032f6cef16151da4336669dc0cde37f4dbab9baa83f7f0b0b33615ff3
4
- data.tar.gz: 239fddb43c620128f8fb3a6d43b2f2b82d87af269582323829ec803032a17cca
3
+ metadata.gz: 433c0f1ad7f53e425f5feaeacde9ad27ec1303062aeda91dcae10e8ef326679c
4
+ data.tar.gz: f49acc4f588d226dddca67f181604605b44f353d67e0a38c5d7a578e1c835c9a
5
5
  SHA512:
6
- metadata.gz: 3436a0659d9b72d8fc7fab7f74ddb663642172489d745ca2627e533d73ba179a8acbe02439ab892e42317466a465c1fe174ec3c7ed3daa96b9e7e70983842310
7
- data.tar.gz: 5a8d0f30454e25c30f2dbeb07ff7608de177e0574ac7a6ea71c4b2012e71a88216f010d1a3c9e7a86569da00a57a45ca1b6c43f6408411faec17bc638a7c8d6f
6
+ metadata.gz: bd55fbd95ac4e58a8e6860b3f278f4b17fd1752ec777b4ce1cbfc7fe9998155ff5c7b8cbc409e60d4cd33ed824390e3d5f9efe5d098d332e41965502e3095724
7
+ data.tar.gz: a0c9151ed9800288dd8a8b56ed121e523a9cca2bcc64c73ff58368ce2c32c87738539fad679816bdfb3c431eaf90b9f8c098057f83e0b60c92590b4af528fe54
@@ -3,9 +3,18 @@
3
3
  module Katalyst
4
4
  module Content
5
5
  module FrontendHelper
6
+ # Render all items from a content version as HTML
7
+ # @param version [Katalyst::Content::Version] The content version to render
8
+ # @return [ActiveSupport::SafeBuffer,String,nil] Content as HTML
9
+ # Example usage:
10
+ # <%= render_content(version) %>
6
11
  def render_content(version)
7
- without_partial_path_prefix do
8
- render partial: version.tree.select(&:visible?)
12
+ capture do
13
+ cache version do
14
+ without_partial_path_prefix do
15
+ concat render partial: version.tree.select(&:visible?)
16
+ end
17
+ end
9
18
  end
10
19
  end
11
20
 
@@ -1,3 +1,3 @@
1
1
  <%= content_editor_new_item item: item, data: { item_type: item.model_name.param_key } do %>
2
- <%= item.model_name.human %>
2
+ <%= t(".#{item.model_name.param_key}", default: item.model_name.human) %>
3
3
  <% end %>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Katalyst
4
4
  module Content
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-content
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-08 00:00:00.000000000 Z
11
+ date: 2023-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_storage_validations
@@ -112,7 +112,6 @@ files:
112
112
  - lib/katalyst/content/config.rb
113
113
  - lib/katalyst/content/engine.rb
114
114
  - lib/katalyst/content/version.rb
115
- - lib/tasks/yarn.rake
116
115
  - spec/factories/katalyst/content/items.rb
117
116
  homepage: https://github.com/katalyst/content
118
117
  licenses:
data/lib/tasks/yarn.rake DELETED
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- namespace :yarn do
4
- desc "Install npm packages with yarn"
5
- task install: :environment do
6
- sh "yarn install"
7
- end
8
-
9
- desc "Lint JS/SCSS files using yarn (prettier)"
10
- task lint: :install do
11
- sh "yarn lint"
12
- end
13
-
14
- desc "Autoformat JS/SCSS files using yarn (prettier)"
15
- task format: :install do
16
- sh "yarn format"
17
- end
18
- end