From 179d9e0d8a851a3f8d89f33609326f7d693c5c67 Mon Sep 17 00:00:00 2001 From: berrysweet Date: Tue, 11 Jul 2023 10:40:12 +0200 Subject: [PATCH] docs: update README --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0dd782b..cb13611 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,50 @@ An application to render [jrnl.sh](https://jrnl.sh) journals as a static website. Written in Rust and licensed under the [GPLv3 license](LICENSE). -## Work In Progress +## Project Status -This is a work in progress. As of right now, there is no meaningful output. +This is a work in progress. -My goal is to be able to run this command and have a website populated by my journal: +## Usage +```shell +jrnl --format json | livejrnl-rs -o $HOME/Websites/livejrnl-rs/ +``` -`jrnl --format json | livejrnl-rs -o $HOME/Websites/livejrnl-rs/` +All [jrnl command line parameters](https://jrnl.sh/en/stable/reference-command-line/) apply here, as long as you use `--format json` somewhere before the pipe, it should work. +## Configuration +Create a default config file by running the following command when using for the first time: + +`livejrnl-rs -h` + +A default config will be created at `$HOME/.config/livejrnl-rs/config.toml` + +Alternatively, you can create the file yourself and paste the following, editing to suit your needs: + +```toml +site_name = 'livejrnl-rs' +base_url = 'localhost' +author = 'me' +template = '/dev/null' +template_index = 'index.html.template' +site_description = 'This is a site rendered with livejrnl-rs.' +site_language = 'en' +``` + +### Configuration Key Reference + +| Key | Type | Description | +| ------------------ | -------- | --------------------------------------------------------------------------------------- | +| `site_name` | `String` | The name of your website | +| `base_url` | `String` | The web address to use for link generation | +| `author` | `String` | Who are you? | +| `template` | `String` | Path to the directory with the template | +| `template_index` | `String` | Relative path to the template to use to generate `index.html` | +| `site_description` | `String` | What is your site about? | +| `site_language` | `String` | What [language](https://www.w3schools.com/tags/ref_language_codes.asp) is your site in? | + +## Templates + +This section needs work. TODO. ## Remarks -- libgit2 1.7.2