diff --git a/Dockerfile b/Dockerfile index 60856bd0..2a0ce691 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ ADD client/package.json client/package-lock.json ./ RUN npm install ADD client /app/ +RUN cp .env.docker .env RUN npm run build # syntax=docker/dockerfile:1.3-labs diff --git a/client/.env.docker b/client/.env.docker index 55fad125..fe76e57e 100644 --- a/client/.env.docker +++ b/client/.env.docker @@ -10,4 +10,5 @@ NUXT_PUBLIC_GOOGLE_ANALYTICS_CODE= NUXT_PUBLIC_H_CAPTCHA_SITE_KEY= NUXT_PUBLIC_PAID_PLANS_ENABLED=false NUXT_PUBLIC_S3_ENABLED=false +NUXT_PUBLIC_IMAGE_OPTIMIZATION_DISABLED=true NUXT_API_SECRET= diff --git a/client/components/pages/templates/SingleTemplate.vue b/client/components/pages/templates/SingleTemplate.vue index 8b403da2..422586cd 100644 --- a/client/components/pages/templates/SingleTemplate.vue +++ b/client/components/pages/templates/SingleTemplate.vue @@ -17,8 +17,8 @@
{
+
+ if (!baseURL) {
+ // also support runtime config
+ baseURL = useRuntimeConfig().public.siteUrl
+ }
+
+ const operations = operationsGenerator(modifiers)
+
+ return {
+ url: joinURL(baseURL, src + (operations ? '?' + operations : '')),
+ }
+}
diff --git a/client/nuxt.config.ts b/client/nuxt.config.ts
index 1c1ec526..d048dbec 100644
--- a/client/nuxt.config.ts
+++ b/client/nuxt.config.ts
@@ -64,8 +64,17 @@ export default defineNuxtConfig({
}
}
},
- image: {
+ image: runtimeConfig.public.useDummyImageProvider ? {
+ provider: 'dummy',
+ providers: {
+ dummy: {
+ provider: '~/lib/dummy-image-provider.js',
+ }
+ }
+ } :{
quality: 95,
+ format: 'webp',
+ domains: ['images.unsplash.com']
},
sourcemap: true,
vite: {
diff --git a/client/pages/templates/[slug].vue b/client/pages/templates/[slug].vue
index 37e85d96..b44d590d 100644
--- a/client/pages/templates/[slug].vue
+++ b/client/pages/templates/[slug].vue
@@ -32,9 +32,9 @@
+