From 7416d9f5a91afbd375aa4fda63507870c64b4777 Mon Sep 17 00:00:00 2001 From: Tomas Granlund Date: Sat, 24 Apr 2021 11:14:03 +0200 Subject: [PATCH] fixed the readme --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7809762..2c92973 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,20 @@ When Node is run, it parses the *.md* file at the end of each line and produces ``` ## Build -`clang notes.c md_renderer.c md4c/md4c.c helpers.c` +`clang src/main.c src/md4c/md4c.c -std=c99` Clang is the most accessible C compiler for windows users and the one I use, but it should compile with any C compiler that supports C99. ## Use `node tree-file.tree -h head.html -f foot.html -c path/to/md/content -o path/to/html/output` +Each line in the tree file is parsed in the following way: +1. The number of `<` characters at the beginning of the line is the depth of the nav entry. +2. The first non-`<` character is the start of the Title of the nav entry. +3. The last sequence of non-whitespace characters before the newline is the file entry. This will be interpreted as one of two things: + 1. If the file entry ends with `.md`, the file is parsed as Markdown and the resulting HTML file is the `href` target for this nav entry. + 2. Otherwise the file entry is directly interpreted as the `href` target for this nav entry. + The file given to `-h` must contain two occurrences of `%s`, where the first will be replaced by the note's title, and the second with the site's nav. Example `head.html`: -- 2.34.4