Skip to content

Frontmatter

Every clan module has a frontmatter section within its readme. It provides machine readable metadata about the module.

Example

The used format is TOML

The content is separated by --- and the frontmatter must be placed at the very top of the README.md file.

---
description = "A description of the module"
categories = ["category1", "category2"]

[constraints]
roles.client.max = 10
roles.server.min = 1
---
# Readme content
...

Overview

This provides an overview of the available attributes of the frontmatter within the README.md of a clan module.

categories

Categories are used for Grouping and searching.

While initial oriented on freedesktop the following categories are allowed

Type: list of (one of "AudioVideo", "Audio", "Video", "Development", "Education", "Game", "Graphics", "Social", "Network", "Office", "Science", "System", "Settings", "Utility", "Uncategorized")

Default:

[
  "Uncategorized"
]

interface.nix

constraints

Contraints for the module

The following example requires exactly one server and supports up to 7 clients

---
constraints.roles.server.eq = 1
constraints.roles.client.max = 7
---

Type: submodule

Default:

{ }

interface.nix

constraints.roles."{roleName}"

Sub-attributes of {roleName} are constraints for the role.

Type: submodule

Default:

{ }

interface.nix

constraints.roles."{roleName}".max

Maximum number of instances of this role that can be assigned to a module of this type.

Type: null or signed integer

Default:

null

interface.nix

constraints.roles."{roleName}".min

Minimum number of instances of this role that must at least be assigned to a module of this type.

Type: signed integer

Default:

0

interface.nix

description

A Short description of the module.

Type: string

interface.nix

features

Clans Features that the module implements support for.

Important

Every ClanModule, that specifies features = [ "inventory" ] MUST have at least one role. Many modules use roles/default.nix which registers the role default.

If you are a clan module author and your module has only one role where you cannot determine the name, then we would like you to follow the convention.

Type: list of (one of "experimental", "inventory")

Default:

[ ]

interface.nix