commit 9e12be5114e8f717bb90316a1a2acebb4fcc5de4
parent 4b7f3350dd1c633c224b35435511ce76f173b12f
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date:   Wed, 29 Jul 2020 14:25:14 +0200

Unify markdown notation

Changes "{{< highlight lang >}}" to "```lang".

Diffstat:
Mcontent/blog/2019-11-10-deploying-website.md | 4++--
Mcontent/blog/2019-12-15-your-corner-of-the-internet.md | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/content/blog/2019-11-10-deploying-website.md b/content/blog/2019-11-10-deploying-website.md @@ -19,7 +19,7 @@ The solution I chose was [rsync](https://rsync.samba.org/). It is a great piece So finally the `rsync` command worked, and the time used to update the website is now around 10 seconds, which is a lot better than a minute (considering my website might get larger, the impact can be even bigger). To automate the process I build a little script that will mount the filesystem, build the site, synchronize it with the server and unmount it again: -{{< highlight bash >}} +```bash #!/bin/bash HUGO_PATH="{path_to_hugo_directory}" @@ -34,6 +34,6 @@ mkdir $TEMP_DIR rsync -ruvc --progress --delete --temp-dir=$TEMP_DIR $HUGO_PATH/public/ $MOUNT_PATH/$WEBDAV_FOLDER rmdir $TEMP_DIR umount $MOUNT_PATH -{{< /highlight >}} +``` As you can see, it is a very simple script. It removes the last built of the site from the local filesystem and builds it again (using the `--minify` option to reduce file sizes), it mounts the WebDAV resource, transfers the files and then unmounts the resource again. diff --git a/content/blog/2019-12-15-your-corner-of-the-internet.md b/content/blog/2019-12-15-your-corner-of-the-internet.md @@ -37,7 +37,7 @@ Because of these advantages, you can find free hosting for static sites and lowe To create a static website with multiple pages, you can use a static site generator. There are a lot of static site generators, and I use Hugo (for a couple of reasons that I might write about some other time). With the use of Hugo—most other generators also offer this functionality—, you can code your navigation bar in a file, your footer in a different one and include both of them in multiple templates. These templates will then gather the content from your Markdown (or HTML) files, put it all together and output all the HTML files of your site. Now that I have an operative site, when I want to publish a new post, I create a file with some metadata and the post content, and Hugo does the rest. Post files look like the following: -{{< highlight markdown >}} +```markdown --- title: "Post title" categories: category @@ -45,7 +45,7 @@ tags: ["tag1", "tag2"] --- Post content. -{{< /highlight >}} +``` Thanks to Hugo, it is very easy to add content to a website, and the source code is neatly organized. Hugo also lets you minify the content to reduce file sizes—although some people might argue against it, I find it useful and some files get reduced by up to 30% (CSS files)[^minify].