From 81ec9331b04065b35424137e4403be2588401b32 Mon Sep 17 00:00:00 2001 From: Louis Solofrizzo Date: Wed, 25 Dec 2019 17:27:45 +0100 Subject: [PATCH] README: Update README with more informations and up-to-date urls Signed-off-by: Louis Solofrizzo --- README.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8559cf1..8681dd6 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,27 @@ # Shayla -Generate an HTML static site from markdown sources. +Generate an HTML static site from markdown sources - [Complete article](https://ne02ptzero.me/blog/making-a-simple-yet-fast-static-site-builder.html) ### Clone - git clone git://git.ne02ptzero.me/shayla --recursive + git clone https://git.mobley.ne02ptzero.me/~louis/shayla --recursive ### Compile and Install cd shayla/ && mkdir build && cd build && cmake .. && make && sudo make install -### Usage +### Packaged versions + +Archlinux user can get the binaries through the AUR packages `shayla` or `shayla-git` + +### Binaries + +You can get the binary directly [here](https://cdn.ne02ptzero.me/shayla/) + +### Using `Shayla` + Usage: shayla -[vhtsldrfuit] + Generate an HTML static site for markdown sources. + If used with no options, shayla will look for directory in the current path. Options: -v, --version Print software version @@ -26,3 +37,60 @@ Generate an HTML static site from markdown sources. -i, --img=DIR Images directory -t, --threads=NUM Number of threads to launch --debug Print more information + +#### Tree + +Here's the 'required' tree for `Shayla`: + + ├── img + ├── layouts + │   ├── footer.html + │   ├── header.html + │   └── intro.html + ├── markdown + └── styles + +'required' is quoted because directories can have any names, could be at any +place on your filesystem. This is just the default setup. + +- `img` is the directory where you are to store all your images. You can + reference them by using `![My super image](img/my_super_image.png)` in your + pages. +- `layouts` is the directory where you are to store the template files of your + sites. `header.html` and `footer.html` are pretty much self explanatory, and + `intro.html` is what it is displayed on the `index.html` page, juste above + the articles. +- `markdown` is where you are to store your pages, in markdown. +- `styles` is where you are to store your `.css` files. + +There is no `shayla init`. I think you can manage creating 4 directories by +yourself. + +#### Post + +A little header is required at the beginning of every post: + + --- + title: My first Article + summary: This is my first article + --- + +These 2 are _required_ for every post. Here's a complete list of all the options: + +- `route`: Future route name of the article. It will be displayed as + `route.html` is the final site. It is up to you to handle duplicates. +- `summary`: A one-line quick summary of the article, It is used for link title + and RSS generation. +- `title`: Title of the article +- `date`: Date of the article in `YYYY-MM-DD` format. If this option is not + here, `shayla` will look for the `last modified` timestamp from the + filesystem in order to establish a chronology. +- `list`: Boolean option, whether or not the article should be listed on the + `index.html`. Default is `true`. + +#### Building the website + + $> shayla --title "My site title" \ + --dest /var/www/htdocs/blog \ + --favicon ~/Pictures/blog_favicon.ico \ + --url "https://blog.ne02ptzero.me" -- 2.45.2