Commit Graph

4 Commits

Author SHA1 Message Date
Jakub Zych
7662d54ab3 fix: image alt texts on markdown posts are written into the markdown
POST /_journal/api/v1/images/alt writes the alt of a markdown post into
its source: the inline image ![alt](src) outside code
(classes.SetMarkdownImageAlt) or a raw img outside code
(classes.SetImageAltOutsideCode), so the next content save keeps it. An
image the markdown does not hold that way is refused with 422
changes.N.src and nothing is written.
2026-11-04 23:20:02 +01:00
Jakub Zych
0e739c882e fix: H1 conversion leaves markdown and unfinished tags alone
ConvertContentH1 rewrites content only when it is HTML; a markdown
source, its code samples included, is kept byte for byte and only its
rendered content_html is converted, on API saves, imports,
journal:fix-headings and translations. ConvertH1 and SetImageAlt keep
the bytes of an unfinished tag at the end of the input.
2026-11-04 23:14:42 +01:00
Jakub Zych
e7832a8d26 test: unit tests for heading conversion, image alt, content facts and related settings
- ConvertContentH1 and ConvertTranslationH1 for post bodies and category
  pillar text
- SetImageAlt with several matches, repeated alt attributes and markup
  that only looks like an img
- the content facts outline, images, decorative images and embeds
- the related-posts mode and count
2026-11-04 19:45:16 +01:00
Jakub Zych
af25eaa677 feat: MCP tools for settings, headings and image alt
- POST /_journal/api/v1/images/alt {dry_run, changes} sets alt on the
  matching img of default or translated content through the tokenizer,
  all or nothing (422), with a RecordSaved per changed post
- MCP journal_get_settings, journal_update_settings, journal_fix_headings
  (manage_settings) and journal_set_image_alt (access_posts, destructive)
- journal:fix-headings help names its output and the refusal
2026-11-04 10:10:52 +01:00