Clean up readme

This commit is contained in:
Endeavorance 2025-06-04 19:10:47 -04:00
parent 515217e347
commit b280b29df6

View file

@ -25,11 +25,23 @@ Options:
## Templates ## 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 - `title`: The title of the document
- `content`: The rendered markdown content - `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 - `datetime` A localized string representing when the build occurred
Additionally, any data defined in YAML frontmatter in the markdown file 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. 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.