openpencil/packages/docs/.vitepress/theme/HomeLayout.vue
Anton A S 513e0b6f4a Add SEO: OG tags, Twitter Card, hreflang, JSON-LD, sitemap
- config.ts: og:site_name, og:image (+w/h/alt), twitter:card/site/image
- config.ts: transformPageData — per-page canonical, og:url, og:locale,
  og:locale:alternate, hreflang for all 6 locales + x-default,
  og:title/description and twitter:title/description from frontmatter
- config.ts: sitemap with xhtml:link alternates for all 174 pages × 6 locales
- SchemaOrg.vue: SoftwareApplication JSON-LD on EN homepage only
- HomeLayout.vue: render SchemaOrg in home-features-after slot
- index.md + de/fr/es/it/pl index.md: add translated title to frontmatter
2026-03-07 19:49:24 +03:00

38 lines
752 B
Vue

<script setup lang="ts">
import DefaultTheme from 'vitepress/theme'
import { useData } from 'vitepress'
import SchemaOrg from './SchemaOrg.vue'
const { Layout } = DefaultTheme
const { frontmatter } = useData()
</script>
<template>
<Layout>
<template #home-hero-after>
<div v-if="frontmatter.layout === 'home'" class="screenshot">
<img
src="/screenshot.png"
alt="OpenPencil editor with a Material 3 design file open"
/>
</div>
</template>
<template #home-features-after>
<SchemaOrg />
</template>
</Layout>
</template>
<style scoped>
.screenshot {
max-width: 1152px;
margin: 0 auto;
padding: 0 24px;
}
.screenshot img {
width: 100%;
border-radius: 12px;
}
</style>