Skip to content

Commit 6421a16

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

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

nuxt.config.ts

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

pages/[...slug].vue

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,13 @@ const allStatus = ["Pendiente", "Leyendo", "Completado", "Omitir"];
108108
const { push } = useRouter();
109109
const route = useRoute();
110110
const nodeId = route.params.slug;
111-
const showSidebar = ref(true);
112111
const content = ref(null);
113112
const statusDropDown = ref(null);
114113
const status = ref($locally.get(nodeId) ?? "Pendiente");
115114
const isScrolled = ref(false);
116115
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-
});
116+
const content = await queryContent((nodeId || []).join("/")).findOne();
117+
const showSidebar = content && (route.query.fromClick || false);
126118
127119
useSeoMeta({
128120
twitterCard: 'summary_large_image',

public/previews/ogpreview.png

415 KB
Loading

0 commit comments

Comments
 (0)