Skip to content

Commit abce3f7

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

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
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: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,21 @@ 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);
112-
const content = ref(null);
113-
const statusDropDown = ref(null);
114111
const status = ref($locally.get(nodeId) ?? "Pendiente");
115112
const isScrolled = ref(false);
116113
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)
114+
const content = await queryContent((nodeId || []).join("/")).findOne();
115+
const statusDropDown = ref(null);
116+
const showSidebar = ref(content && (route.query.fromClick || false));
124117
125-
});
118+
// onMounted(async () => {
119+
// if (!nodeId) return;
120+
// content.value = contentResult;
121+
// showSidebar.value = contentResult && (route.query.fromClick || false);
122+
//
123+
// useContentHead(contentResult)
124+
//
125+
// });
126126
127127
useSeoMeta({
128128
twitterCard: 'summary_large_image',

public/previews/ogpreview.png

415 KB
Loading

0 commit comments

Comments
 (0)