moves website/public/images to common/images
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 949 KiB After Width: | Height: | Size: 949 KiB |
@@ -0,0 +1 @@
|
||||
../../common/images/
|
||||
@@ -1 +0,0 @@
|
||||
../../../common/images/
|
||||
@@ -31,7 +31,6 @@ const GemtextHTMLRenderer: Gemtext.Renderer<string> = {
|
||||
return `<p>${htmlEscape(content)}</p>`
|
||||
},
|
||||
link: function (url: string, alt: string): string {
|
||||
url = url.replaceAll(/^\/images\//g, '/images/capsule/');
|
||||
const imgExtensions: (string | undefined)[] = ['webp', 'png', 'svg', 'gif', 'jpg', 'jpeg', 'apng']
|
||||
if (imgExtensions.includes(url.split('.').at(-1)?.toLowerCase())) {
|
||||
return `<img src="${url}" alt="${alt}" />`;
|
||||
|
||||