blake library
Classes
- Blake
- Blake class ties together all commands and exports callable method for running this program.
- BuildConfig
- Configuration for building static site.
- Config
- Content
- Content symbolizes node in content tree. See Page or Section for concrete implementation.
- ContentParser
- DirectoryServer
- Serves local directory with given path as a web server.
- GitUtil
- LocalServer
-
Local web server used for
blake serve
command. - MarkdownFile
- Page
- Page is leaf node which cannot have other subpages.
- RedirectPage
-
Special Page used for aliasing/redirecting pages. Whenever you specify
aliases
inside your frontmatter, RedirectPage is created. - SearchIndexBuilder
- Build JSON search index for static search of your content.
- Section
- Section is node with other subsections or pages.
- ServeConfig
-
Configuration specific to
build serve
command. - Shortcode
- Shortcode is a single instance/usage of a shortcode inside Markdown file. Each shortcode has a name and zero or more arguments.
- ShortcodeParser
- ShortcodeRenderer
- Replace every shortcode inside text file with its value.
- ShortcodeTemplate
-
ShortcodeTemplate is a single file inside
templates/shortcodes
folder. Shortcode template has a name which equals file name and a template which is this file's content. - SitemapBuilder
- Tag
- TemplatesConfig
- Configures default behavior for template selection.
Extensions
- DirectoryExtension on Directory
- FileSystemEntityExtension on FileSystemEntity
Constants
- fs → const LocalFileSystem
Functions
-
createSearchIndex(
Content content, Config config) → List< Map< String, dynamic> > -
getConfig(
) → Future< Either< ConfigError, Config> > -
Returns content of
config.yaml
file or throws when the file does not exists. -
getContentDirectory(
Config config) → Future< Either< BuildError, Directory> > - Content directory contains Markdown files.
-
getDataDirectory(
Config config) → Future< Directory> -
getPublicDirectory(
Config config) → Future< Directory> - Public directory contains generated static files suitable for publishing.
-
getStaticDirectory(
Config config) → Future< Directory> - Static folder contains files to be copied into public folder like CSS or JS.
-
getTemplatesDirectory(
Config config) → Future< Directory> - Templates folder contains Jinja templates for rendering Markdown files inside content folder.
-
isProjectDirectory(
) → Future< bool> -
jsonToYaml(
dynamic json) → String -
parseAddress(
String address, int port) → Uri - Parse configured base_url.
-
parseDataTree(
Config config, {String? path}) → Future< Map< String, Object?> > -
Parse all YAML and JSON files inside
data_dir
and create data Map which you can access inside templates. -
setupReloadScript(
Config config) → Future< void> -
watch(
String directory, {required Glob files}) → Stream< WatchEvent> -
Watch
directory
for changes in whole subtree exceptpublic
directory.