diff --git a/README.md b/README.md index 28b1efa..216462b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ **WARNING** This project is in its very initial development stage, not all features are implemented yet, usage API still subjected to change until `1.0.0` - ![Logo](/assets/_resized/logo_160x120.png) # Marmite @@ -33,30 +32,85 @@ cargo install marmite Or download the pre-built binary from the [releases](https://github.com/rochacbruno/marmite/releases) page. --> -## Usage +## Usage now -It's simple, really! +> For now templates are not embedded yet, so requires manual step to put it on the input_folder, see [#20](https://github.com/rochacbruno/marmite/issues/20) -```bash -marmite path_to_markdown_files path_to_generated_site +Clone the repo +``` +git clone https://github.com/rochacbruno/marmite/ +``` +Create your input_folder +``` +mkdir my_content +``` +Copy the templates and static to the folder +``` +cp -r marmite/example/{templates,static} my_content ``` +Add some markdown -> **WARNING** CLI not completely implemented yet, see: [#1](https://github.com/rochacbruno/marmite/issues/1) +`my_content/first-post.md` +```markdown +--- +date: 2024-10-24 +tags: marmite,example +--- +# Hello World -```bash -marmite [input_folder] [output_folder] [OPTIONS] +Just write markdown here! +``` +`my_content/about.md` +```markdown +# About me + +I am a person that likes to write! +``` + +Build the site + +```console +$ marmite my_content my_site --serve +Generated index.html +Generated pages.html +Generated first-post.html +Generated about.html +Copied 'my_content/static' to 'my_site/' +Starting built-in HTTP server... +Server started at http://localhost:8000/ - Type ^C to stop. +``` + +Access [http://localhost:8000/](http://localhost:8000/) + +## Usage soon + +~It's~ [(Will be)](https://github.com/rochacbruno/marmite/issues/20) simple, really! + +```console +$ marmite path_to_markdown_files path_to_generated_site +Site generated at path_to_generated_site/ +``` + +CLI + +```console +❯ marmite --help +MARkdown Makes sITEs is a very simple static site generator, mainly for simple blogs. + +Usage: marmite_ [OPTIONS] -input_folder: A folder containing `.md` files. - and optionally: marmite.yaml, templates, static, media folders +Arguments: + Input folder containing markdown files + Output folder to generate the site -output_folder: Directory where the static site will be rendered. +Options: + --serve Serve the site with a built-in HTTP server + --config Path to custom configuration file (defaults to marmite.yaml) + [default: marmite.yaml] + --debug Print debug messages + -h, --help Print help + -V, --version Print version -OPTIONS: - --serve Build and Serve with embedded http server - --config Optional path to a config file - --name Site name - --tagline Text shown in the site header - --url Url where site will be deployed (used when generating feeds) ``` ### Build a site from markdown content