Skip to content

Commit

Permalink
docs: unify the structure of flavors and plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Feb 28, 2024
1 parent 33aa805 commit 2ef39e1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
18 changes: 9 additions & 9 deletions docs/flavors/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ These flavors are placed in the `flavors` subdirectory of the Yazi configuration
└── theme.toml
```

Each flavor is a directory ending with `.yazi`, for instance, the structure of the `bar` flavor is as:
Each flavor is a directory ending with `.yazi`, containing at least the following files:

```
bar.yazi/
├── LICENSE
├── LICENSE-tmtheme
├── README.md
├── screenshot.png
├── theme.toml
└── tmtheme.xml
├── tmtheme.xml
├── screenshot.png
├── README.md
├── LICENSE
└── LICENSE-tmtheme
```

Where:

- `LICENSE` and `LICENSE-tmtheme` are the licenses of the flavor and the `tmtheme.xml` file, respectively.
- `README.md` and `screenshot.png` are the description and the screenshot of the flavor, respectively.
- `theme.toml` is the flavor's configuration file in the format consistent with the [user's `theme.toml`](/docs/configuration/theme).
- `theme.toml` is this flavor's configuration file, in the format consistent with the [user's `theme.toml`](/docs/configuration/theme).
- `tmtheme.xml` is a thTheme file that matches the colors of this flavor for code highlighting.
- `screenshot.png` and `README.md` are the screenshot and the description of this flavor, respectively.
- `LICENSE` and `LICENSE-tmtheme` are the licenses for the flavor and the `tmtheme.xml` file, respectively.

## Cooking a flavor

Expand Down
13 changes: 10 additions & 3 deletions docs/plugins/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,21 @@ You can extend Yazi's functionality through Lua plugins, which need to be placed
└── yazi.toml
```

Each plugin is a directory ending with `.yazi`, containing an `init.lua` file for the plugin's initialization.
For instance, the structure of the `bar` plugin is as:
Each plugin is a directory ending with `.yazi`, containing at least the following files:

```
bar.yazi/
└── init.lua
├── init.lua
├── LICENSE
└── README.md
```

Where:

- `init.lua` is the entry point of this plugin.
- `LICENSE` is the license file for this plugin.
- `README.md` is the documentation of this plugin.

## Usage

A plugin has two usages:
Expand Down

0 comments on commit 2ef39e1

Please sign in to comment.