初次提交旧的文档与blog

This commit is contained in:
2025-08-08 10:01:03 +08:00
commit c9574a02de
57 changed files with 7099 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
title: 开始写作
icon: lucide:edit

View File

@@ -0,0 +1,83 @@
---
title: Markdown
description: 如何使用MDC语法编写文档。
navigation:
icon: lucide:arrow-big-down
---
::card-group
::card
---
title: MDC语法
to: https://content.nuxt.com/docs/files/markdown#mdc-syntax
target: _blank
icon: lucide:arrow-big-down
---
在**Nuxt Content**文档中阅读详细的MDC使用指南。
::
::card
---
title: 组件
to: /components/prose
icon: lucide:box
---
查看**shadcn-docs-nuxt**提供的MDC组件。
::
::
## VS Code集成
### MDC扩展
[Nuxt MDC](https://marketplace.visualstudio.com/items?itemName=Nuxt.mdc)是一个VS Code扩展为MDC语法提供语法高亮和自动完成功能。
启动VS Code快速打开 :shortcut{value="Ctrl"} + :shortcut{value="P"},粘贴以下命令,然后按回车。
```bash [shell]
ext install Nuxt.mdc
```
### 启用组件元数据自动完成
::alert
需要 `Nuxt.mdc >= 0.3.1`
::
::steps{:level="4"}
#### VSCode设置
```json [.vscode/settings.json] line-numbers
{
"mdc.enableComponentMetadataCompletions": true // [!code ++]
}
```
#### 安装 `nuxt-component-meta` 模块
将nuxt-component-meta依赖添加到您的项目中
:pm-install{name="nuxt-component-meta"}
将nuxt-component-meta添加到nuxt.config.ts的modules部分并可选择配置模块
```ts [nuxt.config.ts]
export default defineNuxtConfig({
modules: ['nuxt-component-meta'],
});
```
一旦您的项目构建完成或在开发服务器上运行,扩展将自动扫描您的项目以获取组件元数据,并根据发现的组件提供建议,无需额外配置。
::
## 技巧
### 从目录中隐藏标题
:badge[0.4.7]{variant="outline"}
将标题的 `id` 设置为 `hide-toc` 将从目录中隐藏该标题。
```mdc
:h2[脚注]{id="hide-toc"}
```

View File

@@ -0,0 +1,109 @@
---
title: 页面
description: Estel Docs 中使用的front matter属性。
navigation:
icon: lucide:file-text
---
```md
---
title: Front Matter
description: Estel Dsoc中使用的front matter属性。
icon: lucide:book-type
navBadges:
- value: New
type: lime
authors:
- name: Tony Zhang
username: ZTL-UwU
avatar: https://www.github.com/ZTL-UwU.png
to: https://github.com/ZTL-UwU
target: _blank
---
```
## 展示
:::tabs{variant="line"}
::stack{label="badges"}
![](https://lijue-me.oss-cn-chengdu.aliyuncs.com/20250730134423381.png)
```yml
badges:
- value: 0.8.10
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/FileTree.vue
target: _blank
```
::
::stack{label="authors"}
![](https://lijue-me.oss-cn-chengdu.aliyuncs.com/20250730134509935.png)
```yml
authors:
- name: Tony Zhang
username: ZTL-UwU
avatar: https://www.github.com/ZTL-UwU.png
to: https://github.com/ZTL-UwU
target: _blank
```
::
::stack{label="navBadges"}
![](https://lijue-me.oss-cn-chengdu.aliyuncs.com/20250730134549353.png)
```yml
navBadges:
- value: New
type: lime
```
::
:::
## 参数
::field-group
::field{name="title" type="string"}
页面标题。默认为文件名。
::
::field{name="description" type="string"}
页面描述。默认为页面的第一个 `<p>`{lang="html"}。
::
::field{name="navigation" type="boolean" default-value="true"}
定义页面是否包含在侧边栏中。在 `index.md` 中设置为 `false`
::
::field{name="icon" type="string"}
在侧边栏中为页面显示的图标。
::
::field{name="navBadges" type="[]"}
附加到侧边栏链接末尾的徽章列表。
::
::field{name="navTruncate" type="boolean" default-value="true"}
是否截断侧边栏标题。
::
::field{name="badges" type="[]"}
显示在页面标题底部的徽章列表。
::
::field{name="authors" type="[]"}
显示在页面标题底部的作者列表。
::
::field{name="toc" type="boolean" default-value="true"}
是否为此页面显示目录部分。
::
::field{name="aside" type="boolean" default-value="true"}
是否为此页面显示侧边栏部分。
::
::field{name="editLink" type="boolean" default-value="true"}
是否为此页面显示编辑链接。
::
::field{name="prevNext" type="boolean" default-value="true"}
是否显示上一页和下一页按钮。
::
::field{name="breadcrumb" type="boolean" default-value="true"}
是否显示面包屑导航。
::
::field{name="fullpage" type="boolean" default-value="false"}
是否使用像主页一样的全页面布局。[示例](/简单文档/writing/full-page-example)。
::
::

View 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` |
| :-------------------------------------------------: | :-------------------------------------------: | :---------------------------------------------: |
| ![sidebar-default](/sidebar-default.png){width=400} | ![sidebar-tree](/sidebar-tree.png){width=400} | ![sidebar-group](/sidebar-group.png){width=400} |
::
::
::
::

View File

@@ -0,0 +1,9 @@
---
title: 单页面示例
description: 全页面示例
fullpage: true
navigation:
icon: lucide:layout-template
---
写作ing...