andromeda_cms 0.1.1 → 0.1.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: e0bf0f98d84d4c550f9767a856abdc93167d42cb183a737321db4ff195baa871
4
- data.tar.gz: a54266f37539d9b89907bcc67c9011546c94299c7d29e30487ece2b887a2ae99
3
+ metadata.gz: 662abf6c10c57c55c586ed4251c2c0401ce77cac5f76a0974d4cdce33f1fd62f
4
+ data.tar.gz: dc74176a48e4cc35b04359e81ced65fca9c511239a9d97548243ab260cd961e6
5
5
  SHA512:
6
- metadata.gz: 11abb00fcd58c65c95568093a399684110affa71e756cad1abd4e4ecdf83c3c22a2f9ef6b7628de05fc49eb2d93056b4fe7c116be2b3bd8eafbc92be2297124f
7
- data.tar.gz: 5134eef7dbb6fe51deb56e9e7eddeb346a5982b81cb6de4e3ac9bf37ca57f00d0709e60dfe63da4197c5b931b3047ce242ee691d783e28983e620d2d70c8465f
6
+ metadata.gz: dd1c410bad45f6ab02a83066fabcd7e2d16e7e4e2b1f7875c9744439e787b15a42544b8b755eb59c53365fd8f1d1fb0d0b17dabb6f1089dc513b15d0835f13fb
7
+ data.tar.gz: 9db77b986bacd294a491d76929c213d43591d4926aaaaef96885255dca7b2747fe4f56d23856028917f314cf094f0cd8c9c960ab0cb73fa76ecb979e02ff09c8
data/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ 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.1.2] - 2026-09-27
9
+
10
+ ### Fixed
11
+
12
+ - `Entry#body` returned `nil` in production. Entries there are read from the
13
+ built index, which leaves bodies out, so anything using the raw Markdown --
14
+ a reading-time estimate, a Markdown export -- failed with `NoMethodError`.
15
+ The build now stores each entry's body in its own file (not the index), and
16
+ `Entry#body` reads it from there when needed, the same way `html` works.
17
+ Existing builds pick this up on the next `andromeda:build`.
18
+
8
19
  ## [0.1.1] - 2026-09-27
9
20
 
10
21
  ### Fixed
@@ -38,5 +49,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
38
49
  - Generators: `andromeda:install`, `andromeda:collection`,
39
50
  `andromeda:component` and `andromeda:import_astro`.
40
51
 
52
+ [0.1.2]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.1.2
41
53
  [0.1.1]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.1.1
42
54
  [0.1.0]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.1.0
@@ -230,9 +230,6 @@ module Andromeda
230
230
  # @return [Hash] Symbol-keyed validated frontmatter (may also carry
231
231
  # String keys for unrecognized frontmatter -- see Schema::Result).
232
232
  attr_reader :data
233
- # @return [String] raw Markdown/MDX body, frontmatter stripped but with
234
- # original line numbers preserved (Andromeda::Frontmatter#parse).
235
- attr_reader :body
236
233
  # @return [String] absolute path to the source file.
237
234
  attr_reader :file_path
238
235
  # @return [String] SHA-256 of the whole source file, for cache keys.
@@ -262,6 +259,20 @@ module Andromeda
262
259
  converted[:html]
263
260
  end
264
261
 
262
+ # The raw Markdown/MDX body, frontmatter stripped but with original line
263
+ # numbers preserved (Andromeda::Frontmatter#parse). Entries loaded from
264
+ # source carry it already; in production they come from the index, which
265
+ # leaves bodies out, so it is read from the entry's built file the same
266
+ # way `html` is.
267
+ #
268
+ # @return [String, nil] nil only for a build made before bodies were
269
+ # stored (andromeda_cms < 0.1.2); rebuilding fixes it.
270
+ # @raise [Andromeda::BuildMissing] in production, if this entry has
271
+ # never been built.
272
+ def body
273
+ @body || converted[:body]
274
+ end
275
+
265
276
  # @return [Array<Hash>] `{depth:, slug:, text:}` per heading, in
266
277
  # document order (Andromeda::Renderer::Result#headings).
267
278
  # @raise [Andromeda::BuildMissing] in production, if this entry has
@@ -49,7 +49,7 @@ module Andromeda
49
49
  # `data`/`body`/`digest`/`file_path` all come straight from the
50
50
  # source file, not from a previous build).
51
51
  # @return [Hash] the stored payload (Symbol-keyed: `id`, `collection`,
52
- # `data`, `html`, `headings`, `digest`, `file_path`).
52
+ # `data`, `html`, `headings`, `body`, `digest`, `file_path`).
53
53
  # @raise [Andromeda::SyntaxError, Andromeda::ParserError,
54
54
  # Andromeda::Renderer::MissingComponentError] on a bad file; callers
55
55
  # that want every problem across a whole collection reported together
@@ -69,6 +69,10 @@ module Andromeda
69
69
  data: publish_data_images(entry),
70
70
  html: result.html,
71
71
  headings: result.headings,
72
+ # Kept so `Entry#body` works in production, where entries come from
73
+ # the index and the source file is never read. The index itself
74
+ # leaves it out (Store#index_summary), so listings stay small.
75
+ body: entry.body,
72
76
  digest: entry.digest,
73
77
  render_key: render_key,
74
78
  file_path: entry.file_path
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Andromeda
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: andromeda_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - LIMHAUS Inc.