| 1 | --- |
| 2 | depends: |
| 3 | - custom/index#headmatter |
| 4 | relates: |
| 5 | - features/og-image |
| 6 | tags: [SEO, head] |
| 7 | description: | |
| 8 | Configure SEO meta tags for better social media sharing and search engine optimization. |
| 9 | --- |
| 10 | |
| 11 | # SEO Meta Tags |
| 12 | |
| 13 | Slidev allows you to configure SEO meta tags in the headmatter to improve social media sharing and search engine optimization. You can set up Open Graph and Twitter Card meta tags to control how your slides appear when shared on social platforms. |
| 14 | |
| 15 | ## Configuration |
| 16 | |
| 17 | Add the `seoMeta` configuration to your slides deck frontmatter: |
| 18 | |
| 19 | ```yaml |
| 20 | --- |
| 21 | # SEO meta tags |
| 22 | seoMeta: |
| 23 | ogTitle: Slidev Starter Template |
| 24 | ogDescription: Presentation slides for developers |
| 25 | ogImage: https://cover.sli.dev |
| 26 | ogUrl: https://example.com |
| 27 | twitterCard: summary_large_image |
| 28 | twitterTitle: Slidev Starter Template |
| 29 | twitterDescription: Presentation slides for developers |
| 30 | twitterImage: https://cover.sli.dev |
| 31 | twitterSite: username |
| 32 | twitterUrl: https://example.com |
| 33 | --- |
| 34 | ``` |
| 35 | |
| 36 | This feature is powered by [unhead](https://unhead.unjs.io/)'s `useHead` hook, please refer to the [documentation](https://unhead.unjs.io/docs/head/api/composables/use-seo-meta) for more details. |
| 37 |