You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm migrating a large WP site over to Statamic and the most time consuming thing is replacing internal absolute urls on bard links with Entry IDs.
I've been trying to figure out an artisan command to do it but the best I can think of is using a file reader on each markdown file, running through it line by line and attempting to replace each url line when a matching entry is found, then rewriting the entire markdown file. I'm not going to do this as I'm afraid it will break the markdown or lose content.
I think the easiest thing would be if when saving a bard field it checks all links for matching entries and performs an automatic replacement.
And if you're wondering, why don't I just keep the absolute urls? It's because we're moving from urls with trailing slashes (WP) to ones with no trailing slash.
Thanks!
The text was updated successfully, but these errors were encountered:
stuartcusackie
changed the title
Bard automatically replace absolute urls with entry IDs
Bard: automatically replace absolute urls with entry IDs
Jan 24, 2025
I'm migrating a large WP site over to Statamic and the most time consuming thing is replacing internal absolute urls on bard links with Entry IDs.
I've been trying to figure out an artisan command to do it but the best I can think of is using a file reader on each markdown file, running through it line by line and attempting to replace each url line when a matching entry is found, then rewriting the entire markdown file. I'm not going to do this as I'm afraid it will break the markdown or lose content.
I think the easiest thing would be if when saving a bard field it checks all links for matching entries and performs an automatic replacement.
And if you're wondering, why don't I just keep the absolute urls? It's because we're moving from urls with trailing slashes (WP) to ones with no trailing slash.
Thanks!
The text was updated successfully, but these errors were encountered: