2.4 KiB
Deployment
Since hablo generates static blogs, deployment is a fairly easy step. The only detail to pay attention to is the handling of dependencies.
We show here a simple local deployment of your blog assuming you use NGinx but this is fairly easy to transpose to your favourite web server. First let's create an NGinx configuration file for your blog. Let's put the following basic configuration
server {
server_name blog.turtles.social;
listen 80;
root "/path/to/Turtles paradize";
}
into /etc/nginx/sites_available/turtles.conf
. Of course, the server_name
used here is purely an exemple assuming you bought a domain name for your blog and you pointed it to the very host you're working on. This is in practice highly unlikely; I could've suggested localhost
instead of blog.turtles.social
but you may have other local virtual hosts configured, I can't know your particular setup. You may have simply added an alias like turtles.local
in your /etc/hosts
to bypass all DNS resolution. If you have no idea what I'm saying and this is the first time you've configured a virtual host in NGinx, just use localhost
.
Enable the site
sudo ln -s ../sites_available/turtles.conf /etc/nginx/sites_enabled
and now reload the nginx server.
sudo nginx -s reload
Now let's install the dependencies.
UnitJS
Hablo requires UnitJS which is handled by SJW. Make sure you have installed it regularly with SJW
. If it isn't yet, the following commands should help you:
cd /tmp
git clone https://git.marvid.fr/Tissevert/UnitJS.git
cd UnitJS
mkdir -p ~/.sjw
cp -r src/ ~/.sjw/unitJS
Remarkable
The markdown is converted to HTML in the client browser with the JS library remarkable.
We can simply download it in your js
directory.
wget 'https://cdnjs.cloudflare.com/ajax/libs/remarkable/1.7.1/remarkable.min.js' -O js/remarkable.min.js
That's it ! Your blog should now be displayed when you point your web browser to http://blog.turtles.social
(or http://turtles.local
or http://localhost
depending on what you put in your web server's configuration for server_name
). You might now want to read about tuning it to your taste.