scriptorium/models/database
The database contains all the parsed data from the input files, but not processed content.
Types
Posts organised by month. This is used inside YearPosts
.
pub type MonthPosts =
Dict(Month, OrderedTree(PostWithID))
pub type PostWithID {
PostWithID(id: PostID, post: Post)
}
Constructors
-
PostWithID(id: PostID, post: Post)
Functions
pub fn get_posts_with_ids(
db: Database,
order: WalkOrder,
) -> List(PostWithID)
Get all posts in the given order.
pub fn set_menu(db: Database, menu: List(MenuItem)) -> Database
Set the menu items of the database, replacing any old ones.
pub fn tags(
db: Database,
) -> Dict(String, OrderedTree(PostWithID))
Get posts organised by tags.