diff --git a/.github/workflows/docs-checks.yml b/.github/workflows/docs-checks.yml index d1199bcf7..ce1e37179 100644 --- a/.github/workflows/docs-checks.yml +++ b/.github/workflows/docs-checks.yml @@ -12,6 +12,8 @@ on: - 'scripts/check-stable-ids.ts' - 'scripts/ensure-stable-ids.ts' - 'scripts/redirects-sync.ts' + - 'scripts/tutorial-cards.ts' + - 'public/img/tutorials/**' - 'package.json' - 'pnpm-lock.yaml' - '.github/workflows/docs-checks.yml' @@ -46,6 +48,9 @@ jobs: - name: Check stable IDs run: pnpm stable-ids:check + - name: Check tutorial cards + run: pnpm tutorial-cards:check + # Redirect check diffs against origin/main, so it only makes sense as a # pre-merge gate on PRs. On push to main the merge already landed and # origin/main points at the pushed commit (self-comparison), so skip it. diff --git a/app/components/TutorialCard.vue b/app/components/TutorialCard.vue index 67cefd862..bafd1272a 100644 --- a/app/components/TutorialCard.vue +++ b/app/components/TutorialCard.vue @@ -10,10 +10,8 @@ const props = defineProps<{ }; }>(); -const imageSrc = computed(() => { - const technologies = props.article.technologies?.length ? props.article.technologies : ['directus']; - return `/docs/api/tutorialimg?logos=${technologies.join(', ')}`; -}); +// Cards are baked by `pnpm tutorial-cards`. +const imageSrc = computed(() => `/docs/img/tutorials/cards/${props.article.technologies?.[0] ?? 'directus'}.jpg`);