I am currently working on a project where I need to update the image URLs in some markdown posts pulled from a GitHub repository. The images are all relatively linked, and I want to prepend them with a CDN link globally.
Current:
[000](images/000.png)
Desired:
[000](https://cdn.jsdelivr.net/gh/gaurangrshah/site-cms@main/images/000.png)
I have tried a few methods, but I can't seem to target the "image" for some reason:
post.matter.content = post?.matter?.content.replace(
""images.*\/g"",
${imageBase}/images
);