Add image shortcode editor #2

Open
opened 2026-08-27 15:22:54 +02:00 by gribse · 1 comment
Owner
  • replace md links with hugo shortcode
  • replace wikilinks with hugo shortcode
  • remove "images/" keep everything else, aka media/img.jpg
  • populate the image title if there is one

optional

  • remove empty shortcodes
  • detect mistakes, like a paragraph in lieu of a title (number of chars)

Example cases :

image without caption

![[image]]

album of images without captions

![[image]]
![[image]]

image with captions :

![[image]]
caption here

consecutive images with captions :

![[image]]
caption here

![[image]]
caption here

album with captions :

![[image]]
caption here
![[image]]
caption here
- [ ] replace md links with hugo shortcode - [ ] replace wikilinks with hugo shortcode - [ ] remove "images/" keep everything else, aka media/img.jpg - [ ] populate the image title if there is one optional - [ ] remove empty shortcodes - [ ] detect mistakes, like a paragraph in lieu of a title (number of chars) Example cases : ``` image without caption ![[image]] album of images without captions ![[image]] ![[image]] image with captions : ![[image]] caption here consecutive images with captions : ![[image]] caption here ![[image]] caption here album with captions : ![[image]] caption here ![[image]] caption here ```
Author
Owner
use grep, sed and awk https://codelucky.com/regex-linux-regular-expressions/#Essential_Linux_Tools_for_Regex
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gribse/merl1-cms#2
No description provided.