diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index f59cdaa2..54ee5f74 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -35,6 +35,7 @@ export default defineConfig({ { text: 'Icon in Tabs', link: '/files-and-folders/icon-tabs' }, { text: 'Inheritance', link: '/files-and-folders/inheritance' }, { text: 'Custom Rules', link: '/files-and-folders/custom-rules' }, + { text: 'Use Frontmatter', link: '/files-and-folders/use-frontmatter' }, ], }, { diff --git a/docs/assets/enable-frontmatter-option.png b/docs/assets/enable-frontmatter-option.png new file mode 100644 index 00000000..42e891c7 Binary files /dev/null and b/docs/assets/enable-frontmatter-option.png differ diff --git a/docs/files-and-folders/use-frontmatter.md b/docs/files-and-folders/use-frontmatter.md new file mode 100644 index 00000000..2ecea6d5 --- /dev/null +++ b/docs/files-and-folders/use-frontmatter.md @@ -0,0 +1,22 @@ +# Use Frontmatter + +If you want to use a frontmatter property to set the icon, you can follow this +guide. + +First of, you need to enable the properties option, so that Iconize can read +your frontmatter values. + +![Enable frontmatter option](../assets/enable-frontmatter-option.png) + +After that you can feel free to use the frontmatter property `icon` on any file +to customize the icon for this file. + +For example, you can use the following frontmatter to set the icon for a +specific file: + +```markdown +--- +icon: IbBell +--- +``` +