Rename project

This commit is contained in:
Mikko Ahlroth 2024-04-20 23:03:30 +03:00
parent d8e1b874bc
commit a634ef21ff
44 changed files with 144 additions and 165 deletions

View file

@ -1,19 +0,0 @@
image: ghcr.io/gleam-lang/gleam:v1.1.0-node-alpine
pages:
stage: deploy
environment: production
script:
- gleam deps download
- gleam docs build
- rm -rf public
- mkdir .public
- cp -r ./build/dev/docs/gloss/* .public
- mv .public public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
GIT_SUBMODULE_STRATEGY: recursive

View file

@ -1,4 +1,4 @@
Gloss, Gleam blog generator Scriptorium, Gleam blog generator
Copyright © 2024 Mikko Ahlroth Copyright © 2024 Mikko Ahlroth
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View file

@ -1,22 +1,20 @@
# gloss # scriptorium
Gloss is a simple blog generator for Gleam, using [Lustre](https://hexdocs.pm/lustre) and Scriptorium is a simple blog generator for Gleam, using [Lustre](https://hexdocs.pm/lustre) and
[lustre_ssg](https://hexdocs.pm/lustre_ssg). [lustre_ssg](https://hexdocs.pm/lustre_ssg).
Gloss runs on the JavaScript target and it's tested with Node.js. Scriptorium runs on the JavaScript target and it's tested with Node.js.
<!-- [![Package Version](https://img.shields.io/hexpm/v/gloss)](https://hex.pm/packages/gloss) --> [![Package Version](https://img.shields.io/hexpm/v/scriptorium)](https://hex.pm/packages/scriptorium)
<!-- [![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/gloss/) --> [![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/scriptorium/)
## Quickstart ## Quickstart
Gloss is not yet available on Hex. You can use it with a path dependency instead. Create a new To use Scriptorium, you will need to create a new Gleam project and add Scriptorium as a
Gleam project, clone Gloss to some path, and add the following to `gleam.toml`: dependency.
```toml ```sh
[dependencies] gleam add scriptorium
gleam_stdlib = "~> 0.36 or ~> 1.0"
gloss = { path = "../path/to/gloss" }
``` ```
To generate a default blog, use the following in your main file: To generate a default blog, use the following in your main file:
@ -25,9 +23,9 @@ To generate a default blog, use the following in your main file:
import gleam/result import gleam/result
import gleam/option import gleam/option
import gleam/io import gleam/io
import gloss/builder import scriptorium/builder
import gloss/config.{type Configuration, Configuration} import scriptorium/config.{type Configuration, Configuration}
import gloss/defaults import scriptorium/defaults
pub fn main() { pub fn main() {
let config = let config =
@ -60,6 +58,6 @@ pub fn build(config: Configuration) {
## Documentation ## Documentation
- [Gloss Demo Blog](https://nicd.gitlab.io/gloss_blog) - [Scriptorium Demo Blog](https://nicd.gitlab.io/scriptorium_blog)
- [User's Guide](https://nicd.gitlab.io/gloss_blog/guide.html) - [User's Guide](https://nicd.gitlab.io/scriptorium_blog/guide.html)
- [Gloss API reference](https://nicd.gitlab.io/gloss) - [Scriptorium API reference](https://hexdocs.pm/scriptorium)

View file

@ -1,4 +1,4 @@
name = "gloss" name = "scriptorium"
version = "1.0.0" version = "1.0.0"
target = "javascript" target = "javascript"
gleam = "~> 1.1" gleam = "~> 1.1"
@ -8,10 +8,10 @@ gleam = "~> 1.1"
# #
description = "A simple Gleam blog generator" description = "A simple Gleam blog generator"
licences = ["AGPL-3.0-or-later"] licences = ["AGPL-3.0-or-later"]
repository = { type = "gitlab", user = "Nicd", repo = "gloss" } repository = { type = "gitlab", user = "Nicd", repo = "scriptorium" }
links = [ links = [
{ title = "User's Guide", href = "https://nicd.gitlab.io/gloss_blog/guide.html" }, { title = "User's Guide", href = "https://nicd.gitlab.io/scriptorium_blog/guide.html" },
{ title = "Demo Blog", href = "https://nicd.gitlab.io/gloss_blog" }, { title = "Demo Blog", href = "https://nicd.gitlab.io/scriptorium_blog" },
] ]
# #
# For a full reference of all the available options, you can have a look at # For a full reference of all the available options, you can have a look at

View file

@ -1,7 +1,7 @@
import { DateTime } from "./priv/vendor/luxon/src/luxon.js"; import { DateTime } from "./priv/vendor/luxon/src/luxon.js";
import { Ok, Error } from "./gleam.mjs"; import { Ok, Error } from "./gleam.mjs";
import { Date, parse_month } from "./gloss/utils/date.mjs"; import { Date, parse_month } from "./scriptorium/utils/date.mjs";
import { Time } from "./gloss/utils/time.mjs"; import { Time } from "./scriptorium/utils/time.mjs";
export function dateTimeInZone(dtStr, tz) { export function dateTimeInZone(dtStr, tz) {
const dt = DateTime.fromISO(dtStr, { zone: tz }); const dt = DateTime.fromISO(dtStr, { zone: tz });

View file

@ -1,11 +1,11 @@
//// The builder contains convenience functions to interface with the different //// The builder contains convenience functions to interface with the different
//// parts of gloss, using the configuration to control what is done. //// parts of scriptorium, using the configuration to control what is done.
import gleam/result import gleam/result
import gloss/compiler.{type CompileDatabase} import scriptorium/compiler.{type CompileDatabase}
import gloss/config.{type Configuration} import scriptorium/config.{type Configuration}
import gloss/models/database.{type Database} import scriptorium/models/database.{type Database}
import gloss/rendering/database as render_database import scriptorium/rendering/database as render_database
/// Something failed when building the blog. /// Something failed when building the blog.
pub type BuildError { pub type BuildError {

View file

@ -4,11 +4,11 @@
import gleam/dict.{type Dict} import gleam/dict.{type Dict}
import gleam/list import gleam/list
import gleam/option import gleam/option
import gloss/models/database.{type Database, type PostID} import scriptorium/models/database.{type Database, type PostID}
import gloss/models/page.{type Page} import scriptorium/models/page.{type Page}
import gloss/models/post.{type Post} import scriptorium/models/post.{type Post}
import gloss/utils/marked import scriptorium/utils/marked
import gloss/utils/ordered_tree import scriptorium/utils/ordered_tree
/// Compiled post content: strings that contain HTML. /// Compiled post content: strings that contain HTML.
pub type PostContent { pub type PostContent {

View file

@ -1,11 +1,11 @@
//// The configuration is the main way to customize Gloss's behaviour. //// The configuration is the main way to customize Scriptorium's behaviour.
import gleam/option import gleam/option
import gloss/compiler.{type CompileDatabase, type Compiler} import scriptorium/compiler.{type CompileDatabase, type Compiler}
import gloss/models/database.{type Database} import scriptorium/models/database.{type Database}
import gloss/paths.{type PathConfiguration} import scriptorium/paths.{type PathConfiguration}
import gloss/rendering/database.{type RenderDatabase} as _ import scriptorium/rendering/database.{type RenderDatabase} as _
import gloss/rendering/views.{ import scriptorium/rendering/views.{
type BaseView, type FeedView, type ListPageView, type MetaView, type PageView, type BaseView, type FeedView, type ListPageView, type MetaView, type PageView,
type SinglePostView, type SinglePostView,
} }
@ -35,7 +35,7 @@ pub type Writer =
/// View generators for the blog. These take the database and configuration and /// View generators for the blog. These take the database and configuration and
/// must return a view function that is used for rendering. /// must return a view function that is used for rendering.
/// ///
/// See the `gloss/rendering/views` documentation for descriptions of the /// See the `scriptorium/rendering/views` documentation for descriptions of the
/// individual views. /// individual views.
pub type Views { pub type Views {
Views( Views(

View file

@ -2,20 +2,20 @@
//// blog quickly. //// blog quickly.
import gleam/uri import gleam/uri
import gloss/compiler import scriptorium/compiler
import gloss/config.{type Configuration, Compiling, Configuration, Rendering} import scriptorium/config.{type Configuration, Compiling, Configuration, Rendering}
import gloss/parser import scriptorium/parser
import gloss/paths import scriptorium/paths
import gloss/renderer import scriptorium/renderer
import gloss/rendering/views/base import scriptorium/rendering/views/base
import gloss/rendering/views/feed import scriptorium/rendering/views/feed
import gloss/rendering/views/list_page import scriptorium/rendering/views/list_page
import gloss/rendering/views/meta import scriptorium/rendering/views/meta
import gloss/rendering/views/page import scriptorium/rendering/views/page
import gloss/rendering/views/single_post import scriptorium/rendering/views/single_post
import gloss/writer import scriptorium/writer
/// View generators that use the Gloss builtin views. /// View generators that use the Scriptorium builtin views.
const default_views = config.Views( const default_views = config.Views(
base: base.generate, base: base.generate,
meta: meta.generate, meta: meta.generate,

View file

@ -5,12 +5,12 @@ import gleam/dict.{type Dict}
import gleam/list import gleam/list
import gleam/option.{None, Some} import gleam/option.{None, Some}
import gleam/order.{type Order} import gleam/order.{type Order}
import gloss/models/menu.{type MenuItem} import scriptorium/models/menu.{type MenuItem}
import gloss/models/page.{type Page} import scriptorium/models/page.{type Page}
import gloss/models/post.{type Post, type Tag} import scriptorium/models/post.{type Post, type Tag}
import gloss/utils/date.{type Month} import scriptorium/utils/date.{type Month}
import gloss/utils/ordered_tree.{type OrderedTree} import scriptorium/utils/ordered_tree.{type OrderedTree}
import gloss/utils/uniqid.{type Generator, type UniqID} import scriptorium/utils/uniqid.{type Generator, type UniqID}
/// Internal post ID, generated automatically. /// Internal post ID, generated automatically.
pub type PostID = pub type PostID =

View file

@ -1,6 +1,6 @@
//// A static page in the blog that is not part of any post lists or archives. //// A static page in the blog that is not part of any post lists or archives.
import gloss/models/header.{type Header} import scriptorium/models/header.{type Header}
pub type Page { pub type Page {
Page(title: String, slug: String, headers: List(Header), content: String) Page(title: String, slug: String, headers: List(Header), content: String)

View file

@ -3,10 +3,10 @@
import gleam/int import gleam/int
import gleam/option.{type Option} import gleam/option.{type Option}
import gleam/order.{type Order, Eq} import gleam/order.{type Order, Eq}
import gloss/models/header.{type Header} import scriptorium/models/header.{type Header}
import gloss/utils/date.{type Date} import scriptorium/utils/date.{type Date}
import gloss/utils/luxon.{type DateTime} import scriptorium/utils/luxon.{type DateTime}
import gloss/utils/time.{type Time, Time} import scriptorium/utils/time.{type Time, Time}
pub type PostedAt { pub type PostedAt {
/// The post only had date information. /// The post only had date information.

View file

@ -4,12 +4,12 @@ import gleam/list
import gleam/regex import gleam/regex
import gleam/result import gleam/result
import gleam/string import gleam/string
import gloss/config.{type ParseError, ParseError} import scriptorium/config.{type ParseError, ParseError}
import gloss/models/database.{type Database} import scriptorium/models/database.{type Database}
import gloss/parser/common import scriptorium/parser/common
import gloss/parser/menu import scriptorium/parser/menu
import gloss/parser/page import scriptorium/parser/page
import gloss/parser/post import scriptorium/parser/post
import simplifile import simplifile
/// The default path where input files are read from. /// The default path where input files are read from.

View file

@ -2,7 +2,7 @@ import gleam/bool
import gleam/list import gleam/list
import gleam/result import gleam/result
import gleam/string import gleam/string
import gloss/models/header.{type Header} import scriptorium/models/header.{type Header}
/// The default file extension for source files. /// The default file extension for source files.
pub const filename_postfix = ".md" pub const filename_postfix = ".md"

View file

@ -1,7 +1,7 @@
import gleam/list import gleam/list
import gleam/result import gleam/result
import gleam/string import gleam/string
import gloss/models/menu.{MenuItem} import scriptorium/models/menu.{MenuItem}
/// Parse the content and return menu items. /// Parse the content and return menu items.
pub fn parse(content: String) { pub fn parse(content: String) {

View file

@ -1,8 +1,8 @@
import gleam/list import gleam/list
import gleam/result import gleam/result
import gleam/string import gleam/string
import gloss/models/page.{type Page, Page} import scriptorium/models/page.{type Page, Page}
import gloss/parser/common.{type ParseError, EmptyFile, HeaderMissing, try} import scriptorium/parser/common.{type ParseError, EmptyFile, HeaderMissing, try}
/// Parse page from file data. /// Parse page from file data.
pub fn parse(filename: String, contents: String) -> Result(Page, ParseError) { pub fn parse(filename: String, contents: String) -> Result(Page, ParseError) {

View file

@ -5,16 +5,16 @@ import gleam/option
import gleam/regex import gleam/regex
import gleam/result import gleam/result
import gleam/string import gleam/string
import gloss/models/header.{type Header} import scriptorium/models/header.{type Header}
import gloss/models/post.{type Post, type PostedAt, type Tag, Post} import scriptorium/models/post.{type Post, type PostedAt, type Tag, Post}
import gloss/parser/common.{ import scriptorium/parser/common.{
type ParseError, DayNotInt, EmptyFile, HeaderMissing, InvalidDate, type ParseError, DayNotInt, EmptyFile, HeaderMissing, InvalidDate,
MalformedFilename, MalformedHeader, MonthNotInt, YearNotInt, try, MalformedFilename, MalformedHeader, MonthNotInt, YearNotInt, try,
} }
import gloss/utils/date.{Date} import scriptorium/utils/date.{Date}
import gloss/utils/ints/day import scriptorium/utils/ints/day
import gloss/utils/luxon import scriptorium/utils/luxon
import gloss/utils/time.{type Time, Time} import scriptorium/utils/time.{type Time, Time}
/// Post filenames must match this regex. /// Post filenames must match this regex.
pub const filename_regex = "^\\d{4}-\\d\\d-\\d\\d-.*\\.md$" pub const filename_regex = "^\\d{4}-\\d\\d-\\d\\d-.*\\.md$"

View file

@ -4,10 +4,10 @@
import gleam/int import gleam/int
import gleam/list import gleam/list
import gleam/string import gleam/string
import gloss/models/page.{type Page} import scriptorium/models/page.{type Page}
import gloss/models/post.{type Post} import scriptorium/models/post.{type Post}
import gloss/utils/date.{type Month} import scriptorium/utils/date.{type Month}
import gloss/utils/ints/day import scriptorium/utils/ints/day
const default_root = "" const default_root = ""
@ -25,7 +25,7 @@ pub const default_feed = default_feed_file
pub type PathConfiguration { pub type PathConfiguration {
PathConfiguration( PathConfiguration(
/// The root path where the blog will be accessible. With starting slash but /// The root path where the blog will be accessible. With starting slash but
/// without trailing slash, e.g. `/gloss_blog`. Note that if the blog is /// without trailing slash, e.g. `/scriptorium_blog`. Note that if the blog is
/// accessible without a subpath, this value should be `""`. /// accessible without a subpath, this value should be `""`.
root: String, root: String,
/// The index path. Note that the first page of the index is always written /// The index path. Note that the first page of the index is always written

View file

@ -5,21 +5,21 @@ import gleam/dict.{type Dict}
import gleam/int import gleam/int
import gleam/list import gleam/list
import gleam/result import gleam/result
import gloss/compiler.{ import scriptorium/compiler.{
type CompileDatabase, type CompiledPage, type CompiledPost, type CompileDatabase, type CompiledPage, type CompiledPost,
} }
import gloss/config.{type Configuration} import scriptorium/config.{type Configuration}
import gloss/models/database.{type Database, type PostID, type PostWithID} import scriptorium/models/database.{type Database, type PostID, type PostWithID}
import gloss/rendering/database.{ import scriptorium/rendering/database.{
type RenderDatabase, type RenderedSinglePost, ListPage, RenderDatabase, type RenderDatabase, type RenderedSinglePost, ListPage, RenderDatabase,
RenderedPage, RenderedSinglePost, RenderedPage, RenderedSinglePost,
} as _ } as _
import gloss/rendering/views.{ import scriptorium/rendering/views.{
type BaseView, type FeedView, type ListPageView, type MetaView, type PageView, type BaseView, type FeedView, type ListPageView, type MetaView, type PageView,
type SinglePostView, ListInfo, type SinglePostView, ListInfo,
} }
import gloss/utils/date import scriptorium/utils/date
import gloss/utils/ordered_tree import scriptorium/utils/ordered_tree
import lustre/element.{type Element} import lustre/element.{type Element}
/// Helper struct to pass all the used views to the rendering functions. /// Helper struct to pass all the used views to the rendering functions.

View file

@ -1,9 +1,9 @@
//// The render database stores the rendered posts and pages. //// The render database stores the rendered posts and pages.
import gleam/dict.{type Dict} import gleam/dict.{type Dict}
import gloss/models/page.{type Page} import scriptorium/models/page.{type Page}
import gloss/models/post.{type Post} import scriptorium/models/post.{type Post}
import gloss/utils/date.{type Month} import scriptorium/utils/date.{type Month}
import lustre/element.{type Element} import lustre/element.{type Element}
/// A post and its rendered content. /// A post and its rendered content.

View file

@ -1,6 +1,6 @@
import gloss/compiler.{type CompiledPage, type CompiledPost} import scriptorium/compiler.{type CompiledPage, type CompiledPost}
import gloss/models/page import scriptorium/models/page
import gloss/models/post import scriptorium/models/post
import lustre/element.{type Element} import lustre/element.{type Element}
/// The base view renders the base page layout. /// The base view renders the base page layout.

View file

@ -4,11 +4,11 @@ import gleam/int
import gleam/list import gleam/list
import gleam/option import gleam/option
import gleam/string import gleam/string
import gloss/config.{type Configuration} import scriptorium/config.{type Configuration}
import gloss/models/database.{type Database} import scriptorium/models/database.{type Database}
import gloss/models/menu.{type MenuItem} import scriptorium/models/menu.{type MenuItem}
import gloss/utils/date import scriptorium/utils/date
import gloss/utils/ordered_tree import scriptorium/utils/ordered_tree
import lustre/attribute.{attribute, href, id, name, rel, role, style, type_} import lustre/attribute.{attribute, href, id, name, rel, role, style, type_}
import lustre/element.{type Element, text} import lustre/element.{type Element, text}
import lustre/element/html.{ import lustre/element/html.{
@ -107,7 +107,7 @@ fn view(
text(", "), text(", "),
a([href("https://hexdocs.pm/lustre")], [text("Lustre")]), a([href("https://hexdocs.pm/lustre")], [text("Lustre")]),
text(", "), text(", "),
a([href("https://gitlab.com/Nicd/gloss")], [text("Gloss")]), a([href("https://gitlab.com/Nicd/scriptorium")], [text("Scriptorium")]),
]), ]),
]), ]),
]), ]),

View file

@ -1,10 +1,10 @@
import gleam/list import gleam/list
import gleam/option import gleam/option
import gloss/compiler.{type CompiledPost} import scriptorium/compiler.{type CompiledPost}
import gloss/config.{type Configuration} import scriptorium/config.{type Configuration}
import gloss/models/database.{type Database} import scriptorium/models/database.{type Database}
import gloss/models/post import scriptorium/models/post
import gloss/utils/luxon import scriptorium/utils/luxon
import lustre/attribute.{attribute} import lustre/attribute.{attribute}
import lustre/element import lustre/element
import lustre/ssg/atom.{ import lustre/ssg/atom.{
@ -35,10 +35,10 @@ pub fn generate(_db: Database, config: Configuration) {
]), ]),
generator( generator(
[ [
attribute("uri", "https://gitlab.com/Nicd/gloss"), attribute("uri", "https://gitlab.com/Nicd/scriptorium"),
attribute("version", "1.0.0"), attribute("version", "1.0.0"),
], ],
"Gloss", "Scriptorium",
), ),
rights(config.rendering.copyright), rights(config.rendering.copyright),
..list.map(posts, fn(post) { ..list.map(posts, fn(post) {

View file

@ -1,8 +1,8 @@
import gleam/list import gleam/list
import gloss/config.{type Configuration} import scriptorium/config.{type Configuration}
import gloss/models/database.{type Database} import scriptorium/models/database.{type Database}
import gloss/rendering/views.{type ListInfo} import scriptorium/rendering/views.{type ListInfo}
import gloss/rendering/views/nav import scriptorium/rendering/views/nav
import lustre/attribute.{attribute, class} import lustre/attribute.{attribute, class}
import lustre/element import lustre/element
import lustre/element/html.{footer, nav} import lustre/element/html.{footer, nav}

View file

@ -2,11 +2,11 @@ import gleam/dict
import gleam/list import gleam/list
import gleam/option import gleam/option
import gleam/result import gleam/result
import gloss/config.{type Configuration} import scriptorium/config.{type Configuration}
import gloss/models/database.{type Database} import scriptorium/models/database.{type Database}
import gloss/models/page import scriptorium/models/page
import gloss/models/post import scriptorium/models/post
import gloss/rendering/views.{type PageType, Other, Page, Post} import scriptorium/rendering/views.{type PageType, Other, Page, Post}
import lustre/attribute import lustre/attribute
import lustre/element/html import lustre/element/html

View file

@ -1,7 +1,7 @@
import gleam/int import gleam/int
import gleam/list import gleam/list
import gloss/config.{type Configuration} import scriptorium/config.{type Configuration}
import gloss/rendering/views.{type ListInfo} import scriptorium/rendering/views.{type ListInfo}
import lustre/attribute.{attribute, href} import lustre/attribute.{attribute, href}
import lustre/element.{text} import lustre/element.{text}
import lustre/element/html.{a, li, span, ul} import lustre/element/html.{a, li, span, ul}

View file

@ -1,6 +1,6 @@
import gloss/compiler.{type CompiledPage} import scriptorium/compiler.{type CompiledPage}
import gloss/config.{type Configuration} import scriptorium/config.{type Configuration}
import gloss/models/database.{type Database} import scriptorium/models/database.{type Database}
import lustre/attribute.{attribute, class} import lustre/attribute.{attribute, class}
import lustre/element.{text} import lustre/element.{text}
import lustre/element/html.{article, div, h2, header} import lustre/element/html.{article, div, h2, header}

View file

@ -1,12 +1,12 @@
import gleam/list import gleam/list
import gleam/option import gleam/option
import gloss/compiler.{type CompiledPost} import scriptorium/compiler.{type CompiledPost}
import gloss/config.{type Configuration} import scriptorium/config.{type Configuration}
import gloss/models/database.{type Database} import scriptorium/models/database.{type Database}
import gloss/models/post.{type Post} import scriptorium/models/post.{type Post}
import gloss/utils/date import scriptorium/utils/date
import gloss/utils/luxon import scriptorium/utils/luxon
import gloss/utils/time import scriptorium/utils/time
import lustre/attribute.{attribute, class, href} import lustre/attribute.{attribute, class, href}
import lustre/element.{type Element, text} import lustre/element.{type Element, text}
import lustre/element/html.{ import lustre/element/html.{

View file

@ -2,7 +2,7 @@ import gleam/bool
import gleam/int import gleam/int
import gleam/order.{type Order, Eq} import gleam/order.{type Order, Eq}
import gleam/string import gleam/string
import gloss/utils/ints/day.{type Day} import scriptorium/utils/ints/day.{type Day}
pub type Month { pub type Month {
Jan Jan

View file

@ -1,7 +1,7 @@
//// Bindings to the Luxon library. //// Bindings to the Luxon library.
import gloss/utils/date.{type Date} import scriptorium/utils/date.{type Date}
import gloss/utils/time.{type Time} import scriptorium/utils/time.{type Time}
/// Luxon DateTime. /// Luxon DateTime.
pub type DateTime pub type DateTime

View file

@ -1,6 +1,6 @@
//// Bindings to the marked.js library. //// Bindings to the marked.js library.
import gloss/internal/utils/object.{type Object} import scriptorium/internal/utils/object.{type Object}
/// Marked.js options object. /// Marked.js options object.
pub type Options = pub type Options =

View file

@ -1,8 +1,8 @@
import gleam/uri import gleam/uri
import gloss/internal/utils/meta_url import scriptorium/internal/utils/meta_url
import gloss/internal/utils/path import scriptorium/internal/utils/path
/// Get the path to the `priv` directory of `gloss`. /// Get the path to the `priv` directory of `scriptorium`.
pub fn path() -> String { pub fn path() -> String {
let assert Ok(meta_url) = uri.parse(meta_url.get()) let assert Ok(meta_url) = uri.parse(meta_url.get())

View file

@ -1,8 +1,8 @@
import gleam/int import gleam/int
import gleam/order.{type Order, Eq} import gleam/order.{type Order, Eq}
import gleam/string import gleam/string
import gloss/utils/ints/hour.{type Hour} import scriptorium/utils/ints/hour.{type Hour}
import gloss/utils/ints/minute.{type Minute} import scriptorium/utils/ints/minute.{type Minute}
pub type Time { pub type Time {
Time(hours: Hour, minutes: Minute) Time(hours: Hour, minutes: Minute)

View file

@ -4,9 +4,9 @@ import gleam/dict
import gleam/list import gleam/list
import gleam/result import gleam/result
import gleam/string import gleam/string
import gloss/config.{type Configuration, WriteError} import scriptorium/config.{type Configuration, WriteError}
import gloss/rendering/database.{type RenderDatabase} as _ import scriptorium/rendering/database.{type RenderDatabase} as _
import gloss/utils/priv import scriptorium/utils/priv
import lustre/element import lustre/element
import lustre/ssg import lustre/ssg
import lustre/ssg/xml import lustre/ssg/xml