Compare commits
3 Commits
9a64bad16e
...
8744ba58c9
| Author | SHA1 | Date | |
|---|---|---|---|
| 8744ba58c9 | |||
| 728bc67ddf | |||
| b09fd38e65 |
@@ -0,0 +1 @@
|
||||
../../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 |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 914 KiB After Width: | Height: | Size: 914 KiB |
@@ -14,11 +14,8 @@ RUN npm run astro db push
|
||||
|
||||
COPY website .
|
||||
|
||||
# Some capsule content is symlinked into the website, so
|
||||
# we need to copy over the targets of the symlinks
|
||||
RUN mkdir -p /capsule/content/logs
|
||||
COPY capsule/content/logs/longlog /capsule/content/logs/longlog
|
||||
COPY capsule/content/images /capsule/content/images
|
||||
RUN mkdir -p /common
|
||||
COPY common /common
|
||||
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=4321
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
../../common/images/
|
||||
@@ -1 +0,0 @@
|
||||
../../../capsule/content/images/
|
||||
@@ -1 +1 @@
|
||||
../../../../capsule/content/logs/longlog/
|
||||
../../../../common/longlog/
|
||||
@@ -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}" />`;
|
||||
|
||||