diff --git a/index.html b/index.html index 9097561..1e50235 100644 --- a/index.html +++ b/index.html @@ -3,9 +3,9 @@

avatar.jpg

-
-

 

-
+
+

 

+

Full stack engineer FP-curious | λ-affected @@ -13,9 +13,9 @@ Wanna be rustacean 🦀 and/or secops guy 🔒

-
-

Experience

-
+
+

Experience

+
  • Current position @SamsungFood. Internal tools engineer for data platform ➡ Internal tools engineer for developers.
  • @@ -24,9 +24,9 @@ Fullstack engineer.
-
-

Technologies

-
+
+

Technologies

+

Work with:

@@ -43,9 +43,9 @@ Work with:
-
-

Contacts

-
+
+

Contacts

+

Contact me via:

diff --git a/posts.html b/posts.html index b98f9c4..bacf478 100644 --- a/posts.html +++ b/posts.html @@ -1,12 +1,13 @@ Alex Mikhailov - Blog
-
-

Posts

- -
-

Disclaimer

-
+
+

Disclaimer

+

I'm neither proficient in Org Mode (further on "Org"), nor a good front-end engineer. I think that a simple solution is better than no solution. If you see a mistake, you can contact me via iam@fidonode.me.

-
-

What is Org?

-
+
+

What is Org?

+

Your life in plain text @@ -55,9 +55,9 @@ Everything you can do in Org is to write a text. With a special markup, of cours

-
-

Why Org Mode?

-
+
+

Why Org Mode?

+
  1. Plain text. Plain text as a data source offers significant versatility. You can read and understand what happens in org files without needing Emacs.
  2. @@ -69,16 +69,16 @@ I do not have a habit of collecting and keeping information. I believe that disc
-
-

Render Org to blog or whatever

-
+
+

Render Org to blog or whatever

+

Org already has a way to render files into HTML, allowing you to create simple HTML files with minimal styling. I'm not interesting in styling from org, so I decide to use picocss framework.

-
-

Render HTML

-
+
+

Render HTML

+

I want to change some templates here and there. I've found esxml package. It is a decent DSL for writing XML/HTML. Here is how page header and footer look in this DSL. @@ -183,9 +183,9 @@ So everything is almost done. Time to use our custom publishing function in proj

-
-

Static files

-
+
+

Static files

+

Yep, you may want to publish some photos with your blog or any other static files.

@@ -205,9 +205,9 @@ Looks self explanatory.

-
-

Whole build script

-
+
+

Whole build script

+

Here is the whole elisp script which I use to publish my blog. It have some additional quirks to work with doomscript ./build-site.el.

@@ -365,9 +365,9 @@ Here is the whole elisp script which I use to publish my blog. It have some addi
-
-

Publish through GitHub Action

-
+
+

Publish through GitHub Action

+

With all previous preparations, this step sounds simple like: emacs -Q --script ./build-site.el I've chosen a pretty standard way to publish static sites through GitHub Pages. Since I keep my Org files in a private repo, I need some additional steps to address it. I use the peaceiris/actions-gh-pages@v3 action to publish from my Org repo to the Pages repo. @@ -375,9 +375,9 @@ However, since I use Doom Emacs as my configuration framework, we n

-
-

Install Emacs

-
+
+

Install Emacs

+

If you want to run Emacs Lisp, you need the whole Emacs, at least without GUI. In a GitHub Action, you can simply run:

@@ -388,9 +388,9 @@ This way has a downside - you will install Emacs on each action run since the sy

-
-

Just bring everything

-
+
+

Just bring everything

+

I need to take extra steps since I use Doom Emacs and have my configs in Org. You may also need to install dependencies for your configuration.

@@ -426,9 +426,9 @@ Of course, I use a caching step to make the whole process faster:
-
-

BTW I use GNU Emacs

-
+
+

BTW I use GNU Emacs

+

Here's the whole publishing workflow.

@@ -507,21 +507,21 @@ jobs:
-
-

What is next

-
+
+

What is next

+

I have a plans to make posts about next features:

-
diff --git a/posts/add_rss_to_blog.html b/posts/add_rss_to_blog.html index 31dbe16..f3d9199 100644 --- a/posts/add_rss_to_blog.html +++ b/posts/add_rss_to_blog.html @@ -2,34 +2,34 @@

Table of Contents

-
-

Why do you even need RSS?

-
+
+

Why do you even need RSS?

+

RSS might seem like an outdated, marginal thing. But it still has at least one benefit—you can use an RSS feed as a sitemap for search engines. Plus, it's pretty geeky.

-
-

Add RSS feed

-
+
+

Add RSS feed

+

So, what's happening here? Let's start by integrating our templating functions into the build.

-
-

Use sitemap backend in the build

-
+
+

Use sitemap backend in the build

+
(setq org-publish-project-alist
       (list
        (list "blog-rss"
@@ -59,9 +59,9 @@ How does it work? As you can see, we use the default sitemap generator from Org
 

-
-

Publishing and formatting functions

-
+
+

Publishing and formatting functions

+

We need a mandatory dependency because we don't want to mess with forming correct XML by ourselves.

diff --git a/posts/improve_code_blocks.html b/posts/improve_code_blocks.html index 09d7558..d38efe3 100644 --- a/posts/improve_code_blocks.html +++ b/posts/improve_code_blocks.html @@ -2,33 +2,33 @@

Table of Contents

-
-

What is the problem with default highlighting?

-
+
+

What is the problem with default highlighting?

+

Htmlize works poorly with headless publishing. It lacks extensibility, including features like line numbers, a copy button, and the ability to highlight predefined parts of the code.

-
-

Highlight.js

-
+
+

Highlight.js

+
-
-

Change code block template

-
+
+

Change code block template

+

We need to make small changes in how code blocks are rendered. By default, Org Export exports code blocks as <pre></pre>. For Highlight.js, we need <pre><code></code></pre>. Additionally, we need to set the correct language name in the class attribute. Since Highlight.js does not support elisp, I rewrite it to regular lisp using the my/replace-substring function.

@@ -69,9 +69,9 @@ CONTENTS is nil. INFO is a plist holding contextual information."
-
-

Plug Highlight.js

-
+
+

Plug Highlight.js

+

I do not want to load Highlight.js on every page, so I need to check if the initial Org file contains code blocks. Depending on this, we will render the part of the tree with JavaScript or not.

@@ -105,9 +105,9 @@ I do not want to load Highlight.js on every page, so I need to check if the init
-
-

Respect prefers-color-scheme

-
+
+

Respect prefers-color-scheme

+

Additionally, I think it's a good idea to respect the prefers-color-scheme property of the user's browser. We can switch CSS files based on this property. We should also subscribe to changes in this property to handle the edge case when it switches while reading the page.

@@ -142,9 +142,9 @@ window
-
-

Whole config

-
+
+

Whole config

+

In between posts I've switched from sxml to esxml so here is the current config.

diff --git a/posts/keeb.html b/posts/keeb.html index 1b52b52..cc56666 100644 --- a/posts/keeb.html +++ b/posts/keeb.html @@ -2,51 +2,51 @@

Table of Contents

-
-

My end-game (at least I hope) keyboard

-
+
+

My end-game (at least I hope) keyboard

+
-
-

Keebs path

-
+
+

Keebs path

+

Sometimes I think about the long journey I've made with keebs. In childhood, I had decent membrane keyboards, most of which had an ergonomic profile like the MS. Not sure if it somehow affected my taste because I started my career with the simplest, cheapest board and typed countless lines of code on such keebs. Then I heard about clickity-clack mechanical keyboards and decided to try one. It was a simple Chinese keeb with a thick metal body, double-shot caps, and Cherry Brown switches. A decent thing to annoy everyone around you. I think this purchase marked my dive into mech keebs I'm not a geeky aficionado who thinks you can fix everything with a new keyboard, but I built a couple of them. I hope I've finally built the last one for quite some time.

-
-

Dactyl manuform

-
+
+

Dactyl manuform

+

Almost all of the time, I struggle with my maximalism. So I decided to build the ultimate mechanical ergonomic split keyboard and chose the Dactyl Manuform. Sounds like a crazy idea. Zero experience with QMK, zero experience with hand-wired keyboards, and zero experience in 3D printing. The last problem was the easiest one; I just asked my friend to print the bodies from PETG polymer, and Bob's your uncle. I got two pieces of rough-layered plastic with all the support structures. God, it was a nightmare to clean these prints from supports and small artifacts, but I was happy. @@ -92,9 +92,9 @@ To be honest, this keeb was ugly, and I decided that I wanted a beautiful factor

-
-

Moonlander

-
+
+

Moonlander

+

Nothing special. Ordered, paid, got it, tried it. Everything worked. Looked good. Happy year of typing. Bored. Annoyed. Too big and chunky. No concave. Quality not the best. Started planning the next one.

@@ -107,9 +107,9 @@ Nothing special. Ordered, paid, got it, tried it. Everything worked. Looked good
-
-

Custom Corne

-
+
+

Custom Corne

+

This journey started with discovering the Jian keyboard. It is a niche keeb from the Ru community focused on full support of the whole Russian layout. It was originally created by KGOH. I missed the group buy and decided that I could easily patch a Corne board with two additional keys to mimic the Jian. Interesting journey. I learned how to use KiCad, and how to export gerbers. @@ -158,9 +158,9 @@ Daily driver for ~6 months. Then the world changed, and I decided to leave my ho

-
-

Dactyl manuform again

-
+
+

Dactyl manuform again

+

Two years late I've settled down in new country and decide that I want to bring back my dactyl manuform experience.

@@ -174,13 +174,13 @@ Two years late I've settled down in new country and decide that I want to bring
-
-

Hardware

-
+
+

Hardware

+
-
-

Body

-
+
+

Body

+

I've choose to use a Ryan's generator and generate body on top of Corne preset with all keys in last row and disabled stagger for the last two columns. Generator preset The body was printed by JLC3DP (JLCPCB printing department). I've choose SLS from nylon. Print has minor artifacts; I expected better quality. @@ -216,9 +216,9 @@ Overall, I'm happy with results. I also printed bottom plates and -

Switches and caps

-
+
+

Switches and caps

+

I've chosen Kailh BOX Navy switches. I really like the clickity-clack sound. They have a dedicated clickbar to produce this sound, and the box profile helps with moving down perpendicularly.

@@ -234,9 +234,9 @@ The caps are inherited from the Moonlander. They are thick, double-shot caps wit

-
-

Controllers

-
+
+

Controllers

+

I used a bootleg Pro Micro called Tenstar Robot, based on the ATmega32u4. It's perfectly supported by QMK, pin-to-pin and size-compatible with the Pro Micro.

@@ -249,9 +249,9 @@ I used a bootleg Pro Micro called Tenstar Robot, based on the ATmega32u4. It's p
-
-

Amoeba things

-
+
+

Amoeba things

+

During this build, I decided that I did not want to make a big mess of wires and chose Amoeba single-switch PCBs.

@@ -281,13 +281,13 @@ They are nice, have diodes on board, and simplify wiring. However, they have the
-
-

Software

-
+
+

Software

+
-
-

Plain default - QMK

-
+
+

Plain default - QMK

+

Prerequiremets: QMK CLI @@ -309,9 +309,9 @@ You may want to create a separate keyboard entry in QMK.

-
-

Make own layout

-
+
+

Make own layout

+

I'll try to go through setting of my personal layout. It is based on Jian layout.

@@ -468,8 +468,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-

Whats next?

+
+

Whats next?

diff --git a/posts/posts_preview.html b/posts/posts_preview.html index b720a1a..7d70008 100644 --- a/posts/posts_preview.html +++ b/posts/posts_preview.html @@ -2,23 +2,31 @@

Table of Contents

-
-

What is imagemagick

-
+
+

What is imagemagick

+

Imagemagick is a ffmpeg of the image world. You can do a lot of fun things with it. For example you can take a picture, cut corners on it, place it on top of another image, add some text and get final result. So it is looks like a good tool for making previews from code.

-
-

Basic idea of this process

-
+
+

Basic idea of this process

+

I want to hook a process of rendering post. Since this function called on each run of publishing and for each post it is a good idea to cache resulting images. I gonna simply check presence of preview image and use it as guard for running image generation. After that I gonna extract #+TITLE and #+DESCRIPTION properties from Org file. Each Org file I have, has next header:

@@ -40,9 +48,9 @@ So I with all these data I can generate my previews with simple script:
-
-

Integrate into build

-
+
+

Integrate into build

+

As I already mention I gonna skip file generation when file already here. Here is the whole function. Pretty simple. Just prepare pathes, check some dependencies, create pathes and execute script which calls imagemagick.

@@ -105,4 +113,41 @@ You can check whole function in previous post +

Whats next?

+
+
+
+

Tags

+
+

+Show tags, show posts by tag. +

+
+
+
+

Post series

+
+

+Dunno how, but I'll figure out something. +

+
+
+
+

Adopt/fix htmlize.el

+
+

+I want to highlight code during publishing step. +

+
+
+
+

Show more meta on posts index page.

+
+

+Creation date, preview, tags, whatever. +

+
+
+
diff --git a/rss.html b/rss.html index c78d91e..f556d50 100644 --- a/rss.html +++ b/rss.html @@ -2,38 +2,38 @@

Table of Contents

-
-

Posts preview

-
+ -
-

Improve code blocks

-
+ -
-

Org blog with RSS

-
+ -
-

Org to HTML and back

-
+ -
-

My keyboard journey

-
+ diff --git a/rss.xml b/rss.xml index b1365d2..935522b 100644 --- a/rss.xml +++ b/rss.xml @@ -14,8 +14,8 @@ https://fidonode.me en - Sun, 30 Jun 2024 14:57:13 +0000 - Sun, 30 Jun 2024 14:57:13 +0000 + Sun, 30 Jun 2024 17:31:36 +0000 + Sun, 30 Jun 2024 17:31:36 +0000 Emacs 27.1 Org-mode 9.3 iam@fidonode.me (Alex M)