Skip to content

Commit

Permalink
feat: setup og-image generation
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner committed Feb 3, 2024
1 parent 87d6f67 commit 72665fb
Show file tree
Hide file tree
Showing 5 changed files with 5,179 additions and 233 deletions.
24 changes: 24 additions & 0 deletions components/OgImage/Page.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>

Check failure on line 1 in components/OgImage/Page.vue

View workflow job for this annotation

GitHub Actions / Lint

Component name "Page" should always be multi-word
<div class="bg-[#F9F9F8] h-full w-full">
<div class="absolute h-8 w-full bg-orange-500" />

<div class="flex flex-col justify-center h-full w-full pt-32 p-24">
<h1
class="m-0 text-[75px] font-semibold mb-4 text-sand-12 flex items-center"
>
<span>{{ title }}</span>
</h1>

<p v-if="description" class="text-[32px] text-sand-11 leading-tight">
{{ description.slice(0, 200) }}
</p>
</div>
</div>
</template>

<script setup lang="ts">
defineProps<{
title?: string;
description?: string;
}>();
</script>
11 changes: 10 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,14 @@ export default defineNuxtConfig({
writeEarlyHints: true,
},

modules: ["@nuxt/content", "@nuxtjs/color-mode", "@nuxtjs/tailwindcss"],
modules: [
"@nuxt/content",
"@nuxtjs/color-mode",
"@nuxtjs/tailwindcss",
"nuxt-og-image",
],

site: {
url: "https://btkostner.io",
},
});

0 comments on commit 72665fb

Please sign in to comment.