Crates.io | meet |
lib.rs | meet |
version | 0.2.0 |
source | src |
created_at | 2019-12-31 03:35:32.88177 |
updated_at | 2020-02-20 01:20:10.705124 |
description | meet for building website |
homepage | |
repository | https://github.com/kriry/meet |
max_upload_size | |
id | 193717 |
size | 36,290 |
Meet : The fastest way for building static website !
All projects's website in open.kriry.com written in meet.
cargo build --bin watch
cargo build --bin start
watch start docs target/dist --ext .html
watch is a tool for recursively watching the current working directory and running a command when its contents change.
It's integrated with Git, so it won't rerun the command if an ignored file changes.
Usage
watch <command> [<arg>]...
start is a tool for processing a directory of text files. It allows you to define files that include other files, and substitute variables.
The primary use-case is to make building pure HTML sites a little bit easier.
Features
Usage
start <input-directory> <output-directory> [--ext <extension>]...
Example
start src target/dist --ext .html --ext .css
Start will walk the input directory and process all files.
_
it will be skipped..html
or .css
, it will be processed and written to the output directory.Note that the directory structure is perserved.
Start's features are provided via directives which are simple statements in your files. Directives are enclosed in []
-- e.g. [include raw my-file.html]
. A directive is a space separated list of arguments.
To simplify its behavior, Start does not trim white-space. If a directive cannot be parsed, the program exits with a failure.
You can use the var
or opt
directives to substitute environment variables into the file. var
indicates that the variable is required, while opt
indicates it is optional.
If a variable isn't defined, and opt
is used, the directive will evaluate to the empty string.
var <format> <variable>
opt <format> <variable>
Format may be html
or raw
. If html
, it will be escaped for use in an HTML document. If raw
, it will be substituted directly.
When using raw
, be sure that you're not subjecting yourself to XSS attacks.
<p>Hello [var html MY_VAR]</p>
You can set a variable for use in the current file or included ones.
set <name> <value>
[set name John]
[include raw _template.html]
Stash will take all of the current evaluated content and place it into the specified variable. Content after the stash directive is excluded. This is useful for defining some content in a file, and then evaluating it in the context of a template that renders variables. Also known as the decorator pattern.
stash <variable>
<p>This is my content</p>
[stash content][require _layout.html]
You can include files in other files. If a file includes a file that includes itself, that include will be ignored to break the cycle.
File paths are relative to the file that is being processed.
If the file doesn't exist, the directive will evaluate to the empty string.
include <format> [path]
Format may be html
or raw
. If html
, it will be escaped for use in an HTML document. If raw
, it will be substituted directly.
When using raw
, be sure that you're not subjecting yourself to XSS attacks.
<pre>[include raw /etc/passwd]</pre>
You can require files in other files. If a file includes a file that includes itself, the program will exit with a failure.
File paths are relative to the file that is being processed.
If the file doesn't exist, the program will exit with a failure.
require <format> [path]
Format may be html
or raw
. If html
, it will be escaped for use in an HTML document. If raw
, it will be substituted directly.
When using raw
, be sure that you're not subjecting yourself to XSS attacks.
<pre>[require raw /etc/passwd]</pre>