Logo
RSS Feed

How I Met Hugo



Created: 09.09.2020

There was a time when I was desperately trying to become a web programmer (those wonderful days of naïve curiosity🤦‍♀️). I’ve even attended a course (which turned out to be useless… If only I knew back then, that I could better learn it all for free on my own. Alas!😭).

So I created some repulsive HTML pages with a crappy JavaScript🤮. I remember one of the first projects: a page with a binary converter🙌. Some time later, when I’ve found a job as a C# programmer, I’ve met the beauty of asp.net (http://asp.net/) and realized I don’t have to deal with php (which my soft mental constitution could not bear 👸) and that I don’t always have to write websites from scratch and what’s more, to develop the design for it myself… After I’ve started my career in InfoSec field, I’ve stumbled upon a task which I managed to solve with .net web engine and my beloved C#. But the site was as usual, not very pretty, to say the least… Actually, I’ve tried to copy VisualStudio styles and managed partly, but it was like a 5 year old trying to copy Tician. Almost.

Then I’ve admitted I have no foreseeable future in web design whatsoever (once more I’ve realized that when I had to copycat and edit a page for a social engineering project) and discovered the beauty of site constructors like wordpress which let people like me (deprived of web style taste) to make beautiful projects.

That’s how my first website on InfoSec was born: bakerst221buk.wordpress.com (http://bakerst221buk.wordpress.com/). Then I migrated to another service of the same kind and bakerst221buk.webnode.com (http://bakerst221buk.webnode.com/) was created. But it was so difficult to manage either, to add pages, to edit. And the worst part: it was impossible to add code snipers easily or free and easily. I’ve heard about markdown and was trying to find analogous resource which allowed using it. Unfortunately, they all are either paid or local. So, I postponed this task for a while…

After my beautiful little angel was born, after three months when I’ve got back to work, I’ve felt an urge to keep notes in one place. But my website was, as I mentioned before, difficult to manage. It was time to find another option. Approximately by that time I’ve reanimated my husband’s MacBook after a long “sleep” (of which I was to blame 🤭). And that’s How I Met Hugo and GitPages 😁. Having a github.io (http://github.io/) postfix in address was irritating, so I bought and set up my own domain, which to my surprise was still available.

is a good article about setting up the website which not only gives instructions, but also explains them. And here is an article about setting up a custom domain. Also, in my case it was necessary to delete a parking CNAME record - the problem and solution are described here.

In case someone finds that interesting or I will need it in future.

Thanks the creators of Wordpress and Webnode for an easy and nice start! I would like to give my special thanks to the creators of Hugo, GitPages and this theme for making it possible to do something that difficult and convoluted so quickly and easily! 💖

P.S.

Remove existing files from the repository:

find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch

Add this line:

.DS_Store

to the file .gitignore, which can be found at the top level of your repository (or create the file if it isn’t there already). You can do this easily with this command in the top directory:

echo .DS_Store >> .gitignore

Then commit the file to the repo:

git add .gitignore
git commit -m '.DS_Store banished!'

Obsidian ruins image links when moving the objects. So, to find all of them:

grep -r "img\](" . | grep -v images | grep -v https > allimages.txt

Also, keep in mind that the links should be of the following format:

![img_name_no_spaces](images/image.png)

# To replace image tags broken by Obsidian when moving folders, macOS (ChatGPT): 
find . -type f -name "*.md" -exec perl -i -pe 's/!\[(.*?)\]\((.*\/)*images\/(.*\.(png|jpg|jpeg|gif|pn))\)/![\1](images\/\3)/g' {} +  

find . -type f -name "*.md" -exec perl -i -pe 's/!\[(.*?)\]\(((?:[^\/]+\/)*)(.+?\.(png|jpe?g))\)/![\1](images\/\3)/g' {} +

#find lost images in the folder
find . -type f \( -iname "usb-1.png" -o -iname "usb-2.png" \)

While Obsidian does something like ![[image.png]] when you drag and drop.