Wiki !!

Tissevert 2019-03-08 13:17:58 +01:00
commit d05fd5cd2b
3 changed files with 67 additions and 0 deletions

7
Command-line-options.md Normal file

@ -0,0 +1,7 @@
Hablo provides several options that can be used at runtime. You can view them by running
```bash
hablo --help
```
in a terminal but here's a more complete description.

13
Text-templates.md Normal file

@ -0,0 +1,13 @@
Here is the full list of the available text template variables that you can customize in your wording file.
allLink
allPage
allTaggedPage
commentsSection
dateFormat
latestLink
latestPage
latestTaggedPage
metadata
tagsList

@ -0,0 +1,47 @@
# Generating your blog
Create a directory for it and go inside it.
```bash
mkdir "My perfect life is better than yours"
cd "My perfect life is better than yours"
```
Yeah, apparently you called your blog «My perfect life is better than yours». Whatever floats your boat. It's empty right now, let's create a directory for your articles.
```bash
mkdir articles
```
You could call it something else but that's the name `hablo` expects it to be. Makes sense, for a directory containing articles, no ?
Well let's write an article then !
```bash
cat > articles/My\ cat.md <<EOF
# My cat
Awww she's so cute and funny. Seriously she's hilarious.
EOF
```
Ok, ok, not everyone uses heredocs to write their articles. Personally I don't. What I mean is, you're writing a blog, probably you have your favourite text editor already and I'm not here to tell you what to use. The only thing I care about is, at this point, that you've created the file `My cat.md` in the `articles` directory with some Markdown content in it.
Ready ? Good news, we're almost done. The only thing left is to tag your first article. With hablo articles don't have to be put in a single category but they can be «tagged» this and that to indicate that they are somehow linked to one topic or another. Tags live in a subdirectory of `articles`.
```bash
mkdir -p articles/tag/cat
```
You tag an article by putting a symbolic link to it in the tag folder of your choice.
```bash
ln -s ../../My\ cat.md articles/tag
```
All that's left is to call hablo to look at your fine blog and do its job.
```bash
hablo
```
Yay !! Congrats you've successfully generated your first blog with hablo. Look around, it's all full of HTML files. And a JS directory ! Isn't that somewhat of an accomplishment ? Maybe you should pour yourself a cup of your favourite beverage to celebrate ? No honestly I hate tutorials that do this. Come on ! We've done nothing, this is just the beginning ! But you know the basics of creating a blog with hablo.