Introduction

All my notes are stored in markdown files. My main tool for working with them is Obsidian. In this article I’ll explain how I organize my notes and posts, how I use encryption to secure the data, and how I integrate Obsidian with Hugo for blogging.

Notes Storage

My notes storage is on Yandex Drive in encrypted form. If you go to the notes folder on Yandex Disk, you can see that there are no markdown files or pictures - everything is encrypted.

Encrypted files

I use an app called Cryptomator for encryption.

Cryptomator

Cryptomator mounts a disk with encrypted files, and already in it you can access the files in unencrypted form. From this disk, the vault in Obsidian is opened.

Mounted disk

Organizing notes in Obsidian

In Obsidian itself, I have two folders with notes: notes and blog.

Folders in Obsidian

All notes are created in the notes folder using the command + n keyboard shortcut, which the Unique note creator plugin responds to.

Unique note creator

It creates notes in subfolders with dates using this YYYYY/MM/DD/YYYYY-MM-DD-HH-mm-ss/YYYYY-MM-DD-HH-mm-mm-ss pattern. This allows you to not have to think about where to create a note and which folder to put it in, but just create and start writing.

Note template

Working with images

If you want to insert images or videos into a post, they are automatically moved to the same folder as the markdown file. This is configurable with the Default location for new attachments: Same folder as current file option.

Customization for attachments

In order for images to display in Hugo blog, you need to disable Wikilinks in Obsidian so that all links are in standard markdown syntax.

Disabling Wikilinks

Publish posts

When a post needs to be published, I move it to the blog folder and name the markdown file index.en.md

I then paste the frontmatter at the beginning of the markdown file:

---
title: "Post title"
aliases: ["Post title"]
tags: []
---

In frontmatter, the two properties title and aliases are repeated. This is needed for Hugo, which looks at title, and for Obsidian, which can search for posts by aliases. If you don’t write aliases, Obsidian can’t find a post by its title because the file is renamed to index.en.md, but if aliseses is filled in, the post is easily found by title via Quick Switcher (cmd + o).

Customizing Hugo

Default language

All posts are created in English. The file name is .en.md. You need to specify in Hugo settings that the default language is en.

hugo.yaml

defaultContentLanguage: en

All blog posts should be in the content folder. But since I use Obsidian, I made a symbolic link from the Obsidian repository to the Hugo blog folder:

ln -s /Users/username/Library/Application\ Support/Cryptomator/mnt/encrypted_vault/obsidian/v2/blog content

After that, Hugo will quietly take the posts from the Obsidian repository.

Conclusion

Using Obsidian and Hugo allows you to manage your notes and posts efficiently, keeping them secure and convenient. Data encryption with Cryptomator and integration with Hugo via symbolic links make the blogging process simple and secure.