Skip to content

Commit

Permalink
chore: add ogpreview for default og
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Aug 2, 2024
1 parent 7c46be1 commit abce3f7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
5 changes: 5 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ export default defineNuxtConfig({
defaultLocale: 'es'
},
ogImage: { enabled: false },
nitro: {
prerender: {
routes: ['/sitemap.xml']
}
},
app: {
head: {
charset: 'utf-8',
Expand Down
22 changes: 11 additions & 11 deletions pages/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,21 @@ const allStatus = ["Pendiente", "Leyendo", "Completado", "Omitir"];
const { push } = useRouter();
const route = useRoute();
const nodeId = route.params.slug;
const showSidebar = ref(true);
const content = ref(null);
const statusDropDown = ref(null);
const status = ref($locally.get(nodeId) ?? "Pendiente");
const isScrolled = ref(false);
onMounted(async () => {
if (!nodeId) return;
const contentResult = await queryContent((nodeId || []).join("/")).findOne();
content.value = contentResult;
showSidebar.value = contentResult && (route.query.fromClick || false);
useContentHead(contentResult)
const content = await queryContent((nodeId || []).join("/")).findOne();
const statusDropDown = ref(null);
const showSidebar = ref(content && (route.query.fromClick || false));
});
// onMounted(async () => {
// if (!nodeId) return;
// content.value = contentResult;
// showSidebar.value = contentResult && (route.query.fromClick || false);
//
// useContentHead(contentResult)
//
// });
useSeoMeta({
twitterCard: 'summary_large_image',
Expand Down
Binary file added public/previews/ogpreview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit abce3f7

Please sign in to comment.