|
11 | 11 | This is the about page, with a custom description and image for SEO ✨ |
12 | 12 |
|
13 | 13 |
|
| 14 | +Pages |
| 15 | +Create your Markdown pages in the content/ directory: |
| 16 | + |
| 17 | +# My title |
| 18 | + |
| 19 | +This first paragraph will be treated as the page meta description. |
| 20 | +You can overwrite meta tags by using front-matter: |
| 21 | + |
| 22 | +--- |
| 23 | +title: 'Custom title' |
| 24 | +description: 'Custom meta description' |
| 25 | +image: 'Custom image injected as `og:image`' |
| 26 | +--- |
| 27 | + |
| 28 | +# My title |
| 29 | + |
| 30 | +This first paragraph will be treated as the page meta description. |
| 31 | +This is done thanks to Nuxt Content's document-driven mode of Nuxt Content. |
| 32 | + |
| 33 | +Navigation |
| 34 | +The navigation is generated from your pages, you can take a look at the <AppNavbar> component to see how it works. |
| 35 | + |
| 36 | +It uses the Navigation from Nuxt Content to fetch the navigation object. |
| 37 | + |
| 38 | +To customize the title displayed in the navigation, you can set the navigation.title property in the front-matter of your pages: |
| 39 | + |
| 40 | +--- |
| 41 | +navigation.title: 'Home' |
| 42 | +--- |
| 43 | + |
| 44 | +# Welcome to my site |
| 45 | + |
| 46 | +With a beautiful description |
| 47 | +Theme configuration |
| 48 | +You can configure Content Wind global configuration in the app.config.ts file: |
| 49 | + |
| 50 | +interface AppConfigInput { |
| 51 | + cover?: string, // default: '/cover.jpg' |
| 52 | + socials?: { |
| 53 | + twitter?: string |
| 54 | + github?: string |
| 55 | + mastodon?: string |
| 56 | + } |
| 57 | +} |
| 58 | +Example of settings Twitter and GitHub icons in the navbar: |
| 59 | + |
| 60 | +export default defineAppConfig({ |
| 61 | + socials: { |
| 62 | + twitter: 'Atinux', |
| 63 | + github: 'Atinux/content-wind' |
| 64 | + mastodon: '@atinux@webtoo.ls' |
| 65 | + } |
| 66 | +}) |
| 67 | +Icons |
| 68 | +Use any icon from icones.js.org with the <Icon> component: |
| 69 | + |
| 70 | +<Icon name="i-lucide-music" /> |
| 71 | +You can also use it in your Markdown: |
| 72 | + |
| 73 | +:icon{name="i-lucide-music"} |
| 74 | +Will result in |
| 75 | + |
| 76 | +Learn more on @nuxt/icon documentation. |
| 77 | + |
| 78 | +Code Highlight |
| 79 | +It supports code highlighting with Shiki and as well as different VS Code themes. |
| 80 | + |
| 81 | +```ts |
| 82 | +export default () => 'Hello Content Wind' |
| 83 | +``` |
| 84 | +Will result in: |
| 85 | + |
| 86 | +export default () => 'Hello Content Wind' |
| 87 | +Updating the theme is as simple as editing your nuxt.config: |
| 88 | + |
| 89 | +import { defineNuxtConfig } from 'nuxt' |
| 90 | + |
| 91 | +export default defineNuxtConfig({ |
| 92 | + content: { |
| 93 | + highlight: { |
| 94 | + theme: 'one-dark-pro', |
| 95 | + } |
| 96 | + } |
| 97 | +}) |
0 commit comments