跳到正文
Sumi 中文文档已上线,部分页面暂为英文。阅读 Sumi 介绍
Sumi
本页目录

本页还没有翻译,下面是 English 版本。

File trees#

A filetree fence turns a directory listing into a navigable tree with folder and file icons. Paste the output of tree, or write the structure with plain indentation.

```filetree
my-docs/
├── docs/                 # Markdown sources
│   ├── index.md
│   ├── guide/
│   │   ├── install.md
│   │   └── usage.md
│   └── assets/
│       └── logo.svg
├── overrides/            # Template overrides (optional)
│   └── main.html
├── pyproject.toml
└── mkdocs.yml            # Site configuration
```
  • my-docs/
    • docs/Markdown sources
      • index.md
      • guide/
        • install.md
        • usage.md
      • assets/
        • logo.svg
    • overrides/Template overrides (optional)
      • main.html
    • pyproject.toml
    • mkdocs.ymlSite configuration

Rules#

  • A name ending in /, or a name with children, is a folder. Click a folder to fold it.
  • Text after # is a comment and is aligned in a column.
  • File icons follow the extension: code, text, configuration, data, images and archives.
  • Indentation by spaces works as well as box-drawing characters.

Plain indentation#

```filetree title="Package layout"
src/
  mkdocs_sumi/
    plugin.py      # The MkDocs plugin
    theme/         # Jinja templates and assets
tests/
```
Package layout
  • src/
    • mkdocs_sumi/
      • plugin.pyThe MkDocs plugin
      • theme/Jinja templates and assets
  • tests/

The tree is built at build time from plain HTML <details> elements, so it needs no JavaScript and prints fully expanded.

Esc
↵ 打开 ↑↓ 移动 Esc 关闭
键盘快捷键
Ctrl K /
打开搜索与命令面板
t
切换深色模式
[ ]
上一页 / 下一页
j k
上一个 / 下一个标题
?
显示本帮助