From b280b29df6306244abde03b941da2401830ef292 Mon Sep 17 00:00:00 2001 From: Endeavorance Date: Wed, 4 Jun 2025 19:10:47 -0400 Subject: [PATCH] Clean up readme --- README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 61a1d89..21aac5c 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,23 @@ Options: ## Templates -`buildmd` uses simple HTML files as templates, replacing instances of `%key%` with the value of `key` in the metadata of the document. +`buildmd` uses HTML files as templates. Instances of `%key%` are replaced with value of `key` from the built document. -By default, `buildmd` will look for a `_template.html` file in the current working directory, unless an alternate template is specified with the `--template` or `-t` option. +You can provide a template path with the `--template` or `-t` flag. If no template flag is provided, `buildmd` +will look for a `_template.html` file in the current directory. If no template file is found, a simple +default template will be used. -The following metadata is available by default: +## Stylesheets + +`buildmd` supports custom stylesheets. You can specify a stylesheet with the `--stylesheet` or `-s` flag. + +If no stylesheet is specified, `buildmd` will look for a `_style.css` file in the current directory. + +If no stylesheet is found, a default stylesheet will be used. + +## Data + +The following keys are always available in the template data: - `title`: The title of the document - `content`: The rendered markdown content @@ -38,14 +50,6 @@ The following metadata is available by default: - `datetime` A localized string representing when the build occurred Additionally, any data defined in YAML frontmatter in the markdown file -will be available for use in the template. Properties defined in frontmatter +will be available in the template. Properties defined in frontmatter take precedence over the default metadata. -If no template file is discovered, `buildmd` will inject a default template that includes the stylesheet, title, and content in well-structured HTML. - -## Styles - -`buildmd` will automatically look for a `_style.css` file in the current working directory, unless an alternate stylesheet is specified with the `--stylesheet` or `-s` option. The contents of the discovered stylesheet file will be available in the template as `%stylesheet%`. - -In the event that no stylesheet is found, `buildmd` will inject a default stylesheet. -