seamist

Downloads
Note: This site is still under construction. Most of the content is present and correct but there are a few issues still to correct.

Metadata

SMX files can be separated into two components: metadata and content.

[meta]
title = "Page Name"

[content]
...

The metadata section is everything above the [content] heading. This section must contain valid TOML and can largely use arbitrary values, but there are some reserved properties with specific meanings.

title

Type: string

Specifying title becomes the idiomatic title for this route. If not specified, it takes the filename as its value.

desc

Type: string

Idiomatic description or summary. Used in search results and other places.

author

Type: string

The author of the file.

type

Type: string Values: markdown or html

Indicates the type of content within the file. Defaults to markdown but can be set to html if desired, and if the configuration allows.

created

Type: datetime

The creation date and time of the file. You can set this specifically but it must be parseable as a date/time. If not set, defaults to the file creation time.

modified

Type: datetime

The last modified date/time of the file. You can set this specifically but it must be parseable as a date/time. If not set, deaults to the file last modified time.

tags

Type: string array

Specifies tags which can be used to catgorise the content.

Custom Metadata

You can add your own metadata, and most TOML is valid. You could for example, specify:

[meta]
hidden = true

Then in the website that consumes SeaMist, filter out content with hidden = true specified. For example, like this:

var visibleContent = await content.GetQueryAsync("site-name", "hidden = false", null, null);

You could do a similar trick to allow arbitrary ordering of content items. For example, define something like this in your [meta] section.

[meta]
order = 1

Then query it like this:

var content = await content.GetQueryAsync("site-name", "hidden = false", null, null);
foreach (var item in content.Result.OrderBy(x => x.GetMeta<int>("order"))) {
    // ...
}