Skip to content

Commit fd8d266

Browse files
committed
chore: add ogpreview for default og
1 parent 7c46be1 commit fd8d266

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: bun install
3030

3131
- name: Build
32-
run: bunx nuxi build --preset=cloudflare_pages
32+
run: bunx nuxi generate --preset=cloudflare_pages
3333

3434
- name: Deploy
3535
uses: cloudflare/wrangler-action@v3

.github/workflows/pr-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- name: Install Deps
6363
run: bun install
6464
- name: Build
65-
run: bun run build --preset=cloudflare_pages
65+
run: bun run generate --preset=cloudflare_pages
6666

6767
# Deploy steps
6868
- name: Deploy

bun.lockb

-200 Bytes
Binary file not shown.

nuxt.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ export default defineNuxtConfig({
1010
defaultLocale: 'es'
1111
},
1212
ogImage: { enabled: false },
13+
nitro: {
14+
prerender: {
15+
crawlLinks: true,
16+
routes: ['/sitemap.xml']
17+
}
18+
},
1319
app: {
1420
head: {
1521
charset: 'utf-8',

pages/[...slug].vue

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,6 @@ const statusDropDown = ref(null);
114114
const status = ref($locally.get(nodeId) ?? "Pendiente");
115115
const isScrolled = ref(false);
116116
117-
onMounted(async () => {
118-
if (!nodeId) return;
119-
const contentResult = await queryContent((nodeId || []).join("/")).findOne();
120-
content.value = contentResult;
121-
showSidebar.value = contentResult && (route.query.fromClick || false);
122-
123-
useContentHead(contentResult)
124-
125-
});
126-
127117
useSeoMeta({
128118
twitterCard: 'summary_large_image',
129119
icon: '/favicon.ico',
@@ -132,6 +122,13 @@ useSeoMeta({
132122
twitterImage: `/previews/${(nodeId && nodeId.join('-')) || 'ogpreview'}.png`,
133123
})
134124
125+
onMounted(async () => {
126+
if (!nodeId) return;
127+
const contentResult = await queryContent((nodeId || []).join("/")).findOne();
128+
content.value = contentResult;
129+
showSidebar.value = contentResult && (route.query.fromClick || false);
130+
});
131+
135132
const closeSidebar = () => {
136133
content.value = null;
137134
document.body.classList.remove("overflow-hidden");

public/previews/ogpreview.png

415 KB
Loading

0 commit comments

Comments
 (0)