48 lines
2.1 KiB
Markdown
48 lines
2.1 KiB
Markdown
# Generating your blog
|
|
|
|
Ok, let's start your blog ! Create a directory for it and go inside it.
|
|
|
|
```bash
|
|
mkdir "Turtles paradize"
|
|
cd "Turtles paradize"
|
|
```
|
|
|
|
Apparently it's a blog about turtles. It's empty right now, let's create a directory for your articles.
|
|
|
|
```bash
|
|
mkdir articles
|
|
```
|
|
|
|
You [could call it something else](https://git.marvid.fr/Tissevert/hablo/wiki/Command-line#article-path) but that's the name `hablo` expects it to be. Well let's write an article then !
|
|
|
|
```bash
|
|
cat > articles/Olive\ ridley\ sea\ turtle.md <<EOF
|
|
# Olive ridley sea turtle
|
|
|
|
I love Olive ridley sea turtles ! They are so cool and big and wow !
|
|
EOF
|
|
```
|
|
|
|
Ok, ok, not everyone uses heredocs to write their articles. Personally I don't. You're writing a blog so you probably already have a favourite text editor; use it. The only thing I care about is, at this point, that you've created the file `Olive\ ridley\ sea\ turtle.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 (they don't have to, you can perfectly leave an article untagged but the tags directory itself must exist). Tags live in a subdirectory of `articles`.
|
|
|
|
```bash
|
|
mkdir -p articles/tags/Sea\ turtles
|
|
```
|
|
|
|
You tag an article by putting a symbolic link to it in the tag folders of your choice.
|
|
|
|
```bash
|
|
ln -s ../../Olive\ ridley\ sea\ turtle.md articles/tags/Sea\ turtles
|
|
```
|
|
|
|
All that's left is to call hablo to look at your blog and do its job.
|
|
|
|
```bash
|
|
hablo
|
|
```
|
|
|
|
Yay !! Congratulations, you've successfully generated your first blog with hablo. Look, there are now HTML files and a JS directory in your `Turtles paradize` blog directory.
|
|
|
|
Now you might wonder how to view your blog in your browser so you can start tuning it. Read about [deployment](https://git.marvid.fr/Tissevert/hablo/wiki/Deploying%20a%20hablo%20blog) or [customization](https://git.marvid.fr/Tissevert/hablo/wiki/Customizing%20your%20blog).
|