Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ jobs:
working-directory: ghost/core/core/server/data/tinybird
services:
tinybird:
image: tinybirdco/tinybird-local:latest@sha256:e9f78aab41aed68bbbd376b9abb58ea28b167288186ce81bb11b9d154a01040f
image: tinybirdco/tinybird-local:latest@sha256:49f65a4197ae7ff4aa923ec53e969c03220fbc1ddc38fba5edfe6832aacbb5db
ports:
- 7181:7181
steps:
Expand Down
2 changes: 1 addition & 1 deletion apps/admin-x-settings/src/utils/generate-embed-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const generateCode = ({

if (layout === 'all-in-one') {
if (settings.icon && settings.icon !== '') {
options.icon = settings.icon.replace(/\/content\/images\//, '/content/images/size/w192h192/');
options.icon = settings.icon.replace(/\/content\/images\/(?:size\/[^/]+\/)*/, '/content/images/size/w192h192/');
}
options.title = settings.title;
options.description = settings.description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@ describe('generateCode', function () {
assert.equal(generateCode(genOptions), '<div style="min-height: 58px;max-width: 440px;margin: 0 auto;width: 100%"><script src="https://example.com" data-label-1="label1" data-label-2="label2" data-button-color="#000000" data-button-text-color="#FFFFFF" data-site="https://example.com" data-locale="af" async></script></div>');
});

it('generated an embed with an icon', function () {
it('generated an embed with an icon that has no size segment', function () {
genOptions.settings.icon = 'https://example.com/content/images/2023/09/snoopy.png';
genOptions.layout = 'all-in-one';
assert.equal(generateCode(genOptions), '<div style="height: 40vmin;min-height: 360px"><script src="https://example.com" data-background-color="#000000" data-text-color="#FFFFFF" data-button-color="#000000" data-button-text-color="#FFFFFF" data-title="" data-description="" data-icon="https://example.com/content/images/size/w192h192/2023/09/snoopy.png" data-site="https://example.com" data-locale="af" async></script></div>');
});

it('generated an embed with an icon that already has a size segment', function () {
genOptions.settings.icon = 'https://example.com/content/images/size/w256h256/2023/09/snoopy.png';
genOptions.layout = 'all-in-one';
assert.equal(generateCode(genOptions), '<div style="height: 40vmin;min-height: 360px"><script src="https://example.com" data-background-color="#000000" data-text-color="#FFFFFF" data-button-color="#000000" data-button-text-color="#FFFFFF" data-title="" data-description="" data-icon="https://example.com/content/images/size/w192h192/size/w256h256/2023/09/snoopy.png" data-site="https://example.com" data-locale="af" async></script></div>');
assert.equal(generateCode(genOptions), '<div style="height: 40vmin;min-height: 360px"><script src="https://example.com" data-background-color="#000000" data-text-color="#FFFFFF" data-button-color="#000000" data-button-text-color="#FFFFFF" data-title="" data-description="" data-icon="https://example.com/content/images/size/w192h192/2023/09/snoopy.png" data-site="https://example.com" data-locale="af" async></script></div>');
});

it('renders a full preview', function () {
Expand Down
2 changes: 1 addition & 1 deletion compose.dev.analytics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
condition: service_completed_successfully

tinybird-local:
image: tinybirdco/tinybird-local:latest@sha256:e9f78aab41aed68bbbd376b9abb58ea28b167288186ce81bb11b9d154a01040f
image: tinybirdco/tinybird-local:latest@sha256:49f65a4197ae7ff4aa923ec53e969c03220fbc1ddc38fba5edfe6832aacbb5db
container_name: ghost-dev-tinybird
platform: linux/amd64
stop_grace_period: 2s
Expand Down
2 changes: 1 addition & 1 deletion compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ services:
condition: service_healthy

stripe:
image: stripe/stripe-cli:latest@sha256:49adc22954b07ace90944d0c2816cd8d4c08f527548f150785aff7c4d1109d42
image: stripe/stripe-cli:latest@sha256:91f8f262453f9ab3690bd4aaa3ba27e6902b5b8fb62a635bad20246e414fbadc
container_name: ghost-dev-stripe
entrypoint: ["/entrypoint.sh"]
profiles: ["stripe"]
Expand Down
Loading