完成目录架构变更
This commit is contained in:
57
content/docs/1.简单文档/3.writing/3.folders.md
Normal file
57
content/docs/1.简单文档/3.writing/3.folders.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
title: 目录
|
||||
description: 通过 YML 文件配置目录节点。
|
||||
navigation:
|
||||
icon: lucide:folder
|
||||
---
|
||||
|
||||
You can customize folders by creating a `_dir.yml` file in the folder.
|
||||
|
||||
::code-group
|
||||
```yml [_dir.yml]
|
||||
title: Folder
|
||||
icon: lucide:folder
|
||||
navigation.redirect: /frameworks/vue
|
||||
navBadges:
|
||||
- value: New
|
||||
type: lime
|
||||
sidebar:
|
||||
style: group
|
||||
collapse: false
|
||||
```
|
||||
```[Directory structure]
|
||||
content/
|
||||
1.frameworks/
|
||||
_dir.yml
|
||||
1.vue.md
|
||||
2.nuxt.md
|
||||
```
|
||||
::
|
||||
|
||||
## Parameters
|
||||
|
||||
::field-group
|
||||
::field{name="title" type="string"}
|
||||
Title of the page. Defaults to the filename.
|
||||
::
|
||||
::field{name="icon" type="string"}
|
||||
The icon shown in the sidebar for the page.
|
||||
::
|
||||
::field{name="navBadges" type="[]"}
|
||||
A list of badges appended to the end of the sidebar link.
|
||||
::
|
||||
::field{name="collapse" type="boolean"}
|
||||
Whether the folder should be collapsed by default.
|
||||
::
|
||||
::field{name="sidebar" type="object"}
|
||||
::collapsible{title="Details" default-open}
|
||||
::field{name="style" type="'default' | 'tree' | 'group'" default-value="default"}
|
||||
The style used for the folder. The default value can be configured in the [appConfig](/api/configuration/shadcn-docs#aside).
|
||||
|
||||
| `default` | `tree` | `group` |
|
||||
| :-------------------------------------------------: | :-------------------------------------------: | :---------------------------------------------: |
|
||||
| {width=400} | {width=400} | {width=400} |
|
||||
::
|
||||
::
|
||||
::
|
||||
::
|
Reference in New Issue
Block a user