katalyst-content 1.0.0 → 1.0.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 433c0f1ad7f53e425f5feaeacde9ad27ec1303062aeda91dcae10e8ef326679c
|
4
|
+
data.tar.gz: f49acc4f588d226dddca67f181604605b44f353d67e0a38c5d7a578e1c835c9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
8
|
-
|
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
|
|
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.
|
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:
|
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
|