Skip to content

Commit

Permalink
feat(docs): add documentation for using frontmatter
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWoelki committed Oct 31, 2023
1 parent b4aeb90 commit 49fde75
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
],
},
{
Expand Down
Binary file added docs/assets/enable-frontmatter-option.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions docs/files-and-folders/use-frontmatter.md
Original file line number Diff line number Diff line change
@@ -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
---
```

0 comments on commit 49fde75

Please sign in to comment.