Skip to content

Commit

Permalink
Document stuff a little more organised
Browse files Browse the repository at this point in the history
  • Loading branch information
strawmelonjuice committed Aug 2, 2024
1 parent dfd569d commit 4ebd5e2
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 9 deletions.
9 changes: 9 additions & 0 deletions docs/Admins/configuration/CynthiaConf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# CynthiaConf

Cynthia's configuration can be written in [`TOML`](https://toml.io/) (`Cynthia.toml`), [`Dhall`](https://dhall-lang.org/) (`Cynthia.dhall`) and [`JSON`]([JSON](https://www.json.org/json-en.html)) (`Cynthia.json`). `TOML` is the current default, and as such, these docs will mostly document CynthiaDocs with TOML examples.

## Conversion

Cynthia can convert between config languages using the `cynthiaweb convert <lang>` command.


Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,31 @@ Each scene is defined as a table (`[[]]`) in the `scenes` array (`[[scenes]]`).
Each scene has the following fields:

- `name`: The name of the scene. This value must be unique.

- `sitename`: The name of the site in this scene.
This is optional, as setting a `<title>` in the template is also possible.

- `stylefile`: The name of the site in this scene.
This is optional, as setting a `<link>` in the template is also possible.

- `templates`:
A table that defines the templates to use for each type of publication.

> These templates are always placed in their respective `templates` directory,
> this means that
>
>
> ```toml
> post = "default"
> ```
>
>
> refers to
>
>
> ```path
>
> ./CynthiaFiles/templates/posts/default.handlebars
>
> ```
The following keys are supported:
- `post`: The template to use for posts.
- `page`: The template to use for pages.
- `postlist`: The template to use for post lists.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Templates in Cynthia are written in Handlebars, a simple templating language that allows you to insert variables and logic into your HTML.

> # NOTE:
> [!IMPORTANT]
>
> With Node set to disabled, what remains is a simpler version of Handlebars.
> This version has sufficient, but limited support for helpers.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions docs/Developers/Plugin/apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Plugin API's

# JS/TS

Currently there is only the JS/TS API available. Most important change you should is that Cynthia `v3` communicates with it's plugins over `STDIO`. In Cynthia `v2` this was done through calling arguments and local HTTP ports, causing loads of overhead.

Cynthia `v3` aims to bring comfortable communication with it's plugins back to the levels of `v0/ts-draft`, where a Node plugin would be imported and called as a library, then called with an object, on which methods were available to control Cynthia's behaviour.

The Node package for writing Cynthia plugins can be found at:

<https://www.npmjs.com/package/@cynthiaweb/plugin-api>




Empty file removed docs/configuration/Cynthia.toml.md
Empty file.
27 changes: 27 additions & 0 deletions docs/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Docs

Obviously, Cynthia will self-host it's docs once v3 is far enoug. But for now, to keep docs available in this bridging period... Bamn! GitHub Pages (I don't hate them as bad as WordPress, but...)

A little table-of-content for each subject down below:

## For everyone

- [Enabling or disabling Cynthia features](./features.md)

## For webmasters (AKA Cynthia-admins)

- [Managing publications: `publications.jsonc`](./Admins/publication/published.jsonc.md)

- [Configuring Cynthia: `CynthiaConf`](./Admins/configuration/CynthiaConf.md)

- [Setting up scenes](./Admins/configuration/CynthiaConf/scenes.md)

- [Writing templates](./Admins/customisation/templates.md)

## For developers

Interested in developing on Cynthia itself? Feel free to leave an issue or PR on [the GitHub](https://github.com/strawmelonjuice/CynthiaWebsiteEngine).

### For plugin developers

- [Available API's](./Developers/Plugin/apis.md)

0 comments on commit 4ebd5e2

Please sign in to comment.