1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! ## Cydonia
//!
//! The static site generator.
//!
//! For the minimal directory layout:
//!
//! ```ignore
//! .
//! ├── cydonia.toml
//! └── posts
//!     └── 2024-01-01-hello-world.md
//! ```
//!
//! The full configuration:
//!
//! ```toml
//! # my-blog/cydonia.toml
//! title = "Cydonia"         # The title of the site.
//!
//! # Default values of the optional fields.
//! # --------------------------------------
//! favicon = "favicon.svg"   # The path to the favicon.
//! out = "out"               # The path to the output directory.
//! posts = "posts"           # The path to the posts.
//! public = "public"         # The path to the public directory.
//! templates = "templates"   # The path to the templates.
//!
//! # Theme could also be a folder:
//! #
//! # - [theme]
//! #   - index.css (optional)
//! #   - post.css  (optional)
//! #   - theme.css (optional)
//! theme = "theme.css"
//! ```
//!
//! ## LICENSE
//!
//! GPL-3.0-only

mod app;
pub mod cmd;
mod manifest;
mod post;
mod utils;

pub use self::{
    app::{App, LIVERELOAD_ENDPOINT},
    manifest::{Manifest, MINIMAL_MANIFEST},
    post::{Meta, Post, TEMPLATE_POST},
};

/// The default cydonia templates.
#[derive(rust_embed::RustEmbed)]
#[folder = "blog/templates"]
#[include = "*.hbs"]
pub struct Templates;

#[test]
fn embed() {
    assert!(Templates::get("post.hbs").is_some());
}