Skip to content

style: reformat content to match Decap CMS output - #1135

Merged
lenderom merged 3 commits into
mainfrom
refactor/optimize-for-decap
Aug 7, 2026
Merged

style: reformat content to match Decap CMS output#1135
lenderom merged 3 commits into
mainfrom
refactor/optimize-for-decap

Conversation

@MoritzWeber0

@MoritzWeber0 MoritzWeber0 commented Aug 7, 2026

Copy link
Copy Markdown
Member

The goal is to have less changes done by Decap DMS by using a consistent style in all markdown files.
It resolved #1110 too :)

  • Quotes removed from frontmatter, added line-wrapping
  • Sorted shortcode parameters and added wrapping / 4 space indentation
  • Make shortcodes self-closing where possible
  • Explicitly add reservation_required and reservation_possible to train-category expanders.

Also fixes pre-existing content bugs surfaced along the way:

  • Missing alt text on float-image shortcodes in Traivelling Website and SLL
  • Missing required id on train-category shortcodes in STL

Re-serializes frontmatter and shortcode bodies to exactly match what
Decap CMS's editor would write, so future CMS saves don't produce
unrelated diffs.

- Frontmatter: re-serialized with the yaml package used internally by
  decap-cms-core (quotes removed where not required, kept where
  needed).
- Shortcodes: ported the fromBlock/toBlock logic from
  static/admin/shortcodes.js to normalize indentation, quoting, and
  multiline wrapping for train-category, booking, highlight,
  float-image, dialog, etc.
- Archetypes: aligned param ordering and boolean bareness in the
  operator archetype's fip-validity and booking shortcode examples
  with the same convention (frontmatter left untouched since values
  are Go template expressions, not literal YAML).

Also fixes pre-existing content bugs surfaced along the way:
- Invalid YAML in content/_index.*.md (unindented multi-line quoted
  strings) that would break Decap's real parser.
- Missing alt text on float-image shortcodes in
  content/booking/traivelling-website/*.md and content/operator/sll/*.md.
- Missing required id on train-category shortcodes in
  content/operator/stl/*.md.
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Hi there! 👋

Thank you for your contribution to the FIP Guide! 🚀
We appreciate your effort in making rail staff travel information more accessible. 🚄

Checklist before merging:

  • Added a description to the Pull Request
  • Checked the License of new pictures (non-commercial use without attribution)
  • Modified content in English
  • Modified content in German
  • Modified content in French

@MoritzWeber0
MoritzWeber0 force-pushed the refactor/optimize-for-decap branch from b420031 to 3b0b99c Compare August 7, 2026 17:48
@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit 00c12dd
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/6a76262377d83c0008893b6b
😎 Deploy Preview https://deploy-preview-1135--fipguide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@MoritzWeber0
MoritzWeber0 requested review from lenderom and removed request for lenderom August 7, 2026 18:08
- Revert {{< highlight >}} shortcodes that were mistakenly changed to
  {{% highlight %}} during the Decap CMS reformat
- Restore reservation_required/reservation_possible on train-category
  shortcodes, ensuring reservation_possible is true whenever
  reservation_required is true
@MoritzWeber0
MoritzWeber0 marked this pull request as ready for review August 7, 2026 18:43
@MoritzWeber0
MoritzWeber0 requested a review from lenderom August 7, 2026 18:43
@lenderom
lenderom merged commit 0305153 into main Aug 7, 2026
7 checks passed
@lenderom
lenderom deleted the refactor/optimize-for-decap branch August 7, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unresolved markdown in some booking train category expanders

2 participants