feat: Use SveltiaCMS instead of DecapCMS - #1171
Draft
MoritzWeber0 wants to merge 15 commits into
Draft
Conversation
|
Hi there! 👋 Thank you for your contribution to the FIP Guide! 🚀 Checklist before merging:
|
✅ Deploy Preview for fipguide ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
MoritzWeber0
force-pushed
the
feat/use-sveltia-cms
branch
from
August 19, 2026 07:28
9e0df37 to
d6baec1
Compare
Sveltia CMS now supports CMS.registerFieldType/getFieldType, so the fip-validity-select widget can reuse the built-in select control with dynamically computed options again, matching the pre-migration Decap implementation. Also restores the folder-based fip-validity collection with YAML anchors for the target group fields, letting Sveltia auto-discover validity.yaml files natively instead of relying on Hugo templating for both.
CMS.getFieldType("number") is now available in Sveltia, so the custom
footnote number field can render the native number input/stepper UI
instead of a plain HTML input, consistent with the fip-validity-select
widget.
fromBlock appended /index to the id/sources values before feeding them
to the relation fields, but value_field: "{{slug}}" resolves to the
plain entry slug without the path suffix. This mismatch meant no
option matched on load, leaving the dropdown empty even though a
booking platform or operator was already referenced in the shortcode.
Manual selection appeared to work because the param.transform stripped
/index again on write, masking the read-side bug.
The booking platform link can't reactively track the relation field's live value (editor component sub-fields aren't part of the entry data Sveltia exposes, and relation can't be reused via getFieldType), so it now points to the Booking Platforms collection list instead of trying to derive a stale per-entry link. Also sets create: false on the operator collection, since Sveltia defaults entry collections to create: true unlike Decap CMS.
The FIP Validity Table edit link needs /validity appended, since the
collection uses path: "{{slug}}/validity" and the entry route slug
includes that segment.
Also set static summary text on the Operators, per-operator and
FIP Coupon/Reduced Ticket object fields, since without an explicit
summary Sveltia falls back to displaying an arbitrary nested field's
value (e.g. the first validity group's selected name) when collapsed,
which doesn't convey anything useful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Open issues: