andromeda_cms 0.4.2-x86_64-linux → 0.5.0-x86_64-linux

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: df0ef293dcd54df1ce6dc857f740a30012c365a35484538732690331f5885920
4
- data.tar.gz: e605ce54678ac162bfff6dd3a8833d17389f8a10ef35f7407a1cb9aac7edd187
3
+ metadata.gz: 03ab78f438713d8cd183ac96f3793c2c2edbbb333d34946194019f3995703209
4
+ data.tar.gz: 772700733a8ff9222a5d84383015894eaab3f77311d292fbf827825dbac688f4
5
5
  SHA512:
6
- metadata.gz: 14832443cee56c5912edf60d7cc435cf83b215facf8bdc064c5db39437379b0b98f74dd76e47328381ef9d7c01b2c4f9532468b247150d0e48d172b90226e0b4
7
- data.tar.gz: 4c1e18357f02190f8df64a09abd9f02380b4b066edfa50e5d9856d1ac6547cebc7a94232b752ae26ba5b4aad5a38379851e98aeb970fb9e62f350641a332711d
6
+ metadata.gz: d4b27eda0bf028f490e1672aa98cc3b15aa1ef3dc7d484212b1182595dc3900125786932f27e5cdc5f0f819e356f50905c7a991857e59d08457e00064165d499
7
+ data.tar.gz: b4706963e72a3f7366607eca5e5697f4363d6250963080b9a66f3ed1060e8461efb53c14c31f5a71e361f7d2447ea145db4018894ea5dd363fce4c4c20a91d2b
data/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.0] - 2026-10-07
9
+
10
+ ### Changed
11
+
12
+ - `andromeda_content` now wraps the entry body in an `<andromeda-content>`
13
+ element, so the body can be targeted from CSS. Browsers treat an unknown
14
+ element as inline, so add `andromeda-content { display: block; }` to your
15
+ stylesheet. Markup that selected the body's direct children from the
16
+ parent element needs updating. Inside a component rendered during
17
+ `andromeda:build` the wrapper is left out, so an embedded entry is not
18
+ wrapped twice.
19
+
8
20
  ## [0.4.2] - 2026-09-30
9
21
 
10
22
  ### Fixed
@@ -141,6 +153,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
141
153
  - Generators: `andromeda:install`, `andromeda:collection`,
142
154
  `andromeda:component` and `andromeda:import_astro`.
143
155
 
156
+ [0.5.0]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.5.0
144
157
  [0.4.2]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.4.2
145
158
  [0.4.1]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.4.1
146
159
  [0.4.0]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.4.0
data/README.md CHANGED
@@ -107,6 +107,10 @@ end
107
107
  </article>
108
108
  ```
109
109
 
110
+ `andromeda_content` wraps the body in an `<andromeda-content>` element. Browsers
111
+ treat it as inline by default, so add `andromeda-content { display: block; }`
112
+ to your stylesheet.
113
+
110
114
  From there it is your code. A typical next step is to make fields mandatory,
111
115
  add a draft flag, and add a table of contents:
112
116
 
@@ -5,7 +5,11 @@ module Andromeda
5
5
  # thin presentation layer over data the build already produced: no parsing
6
6
  # or rendering happens while serving a request.
7
7
  module Helpers
8
- # Outputs an entry's converted body. Marked html_safe because the build
8
+ # Outputs an entry's converted body, wrapped in `<andromeda-content>` so
9
+ # it can be targeted from CSS. Inside a component rendered at conversion
10
+ # time the wrapper is left out: the component's output is stored in the
11
+ # entry's html and wrapped once, when the page is served. Marked
12
+ # html_safe because the build
9
13
  # produced this markup from content the application's own authors wrote,
10
14
  # the same trust model Astro applies to `.md`/`.mdx` (see 13_security).
11
15
  # Inside a component rendered at conversion time the asset markers are
@@ -14,8 +18,9 @@ module Andromeda
14
18
  # @param entry [Andromeda::Entry]
15
19
  # @return [ActiveSupport::SafeBuffer]
16
20
  def andromeda_content(entry)
17
- html = Andromeda::BuildContext.converting? ? entry.html : Andromeda::Assets.resolve(entry.html)
18
- html.html_safe # rubocop:disable Rails/OutputSafety
21
+ return entry.html.html_safe if Andromeda::BuildContext.converting? # rubocop:disable Rails/OutputSafety
22
+
23
+ tag.send("andromeda-content", Andromeda::Assets.resolve(entry.html).html_safe) # rubocop:disable Rails/OutputSafety
19
24
  end
20
25
 
21
26
  # Inside a component partial rendered at conversion time, this returns
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Andromeda
4
- VERSION = "0.4.2"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: andromeda_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - LIMHAUS Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-30 00:00:00.000000000 Z
11
+ date: 2026-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties