/

File Tree

The .filetree docs ↗ function creates a visual file tree from a standard Markdown list. Each inline item becomes a file, and each nested list becomes a directory.

Example 1

.filetree
    - src
      - components
        - Button.ts
        - Card.ts
      - index.ts
    - README.md
  • src
    • components
      • Button.ts
      • Card.ts
    • index.ts
  • README.md

Ellipsis

An item with ... as its text is rendered as an ellipsis, representing omitted content in the tree.

Example 2

.filetree
    - src
      - main.ts
      - ...
    - LICENSE
    - README.md
  • src
    • main.ts
  • LICENSE
  • README.md

Highlighting entries

Wrapping an entry’s name in bold (**...**) highlights it, useful for drawing attention to specific files or directories.

Example 3

.filetree
    - **src**
      - main.ts
      - utils.ts
    - LICENSE
    - **README.md**
  • src
    • main.ts
    • utils.ts
  • LICENSE
  • README.md