Today’s project was all about building out logbook! Over the weekend, I played around with the kramdown library and found that I could use their built-in converters for the most part to convert markdown into HTML. The purpose of this project was to be able to write very simple daily logs of what I worked on, which might span multiple projects. Rather than having to take notes per-project, I can take notes for the day and, if appropriately tagged, my logbook site builder will generate both the daily log HTML and the project-based daily logs as well. My hope is that this will make it easier for me to come back to projects even if it’s been a while. A one stop shop for project notes, if you will.
Today’s work was to write the custom Kramdown::Converter
for my project. This
essentially looks for any HTML elements which have a particular project
attribute
added to it, and build out html files for each project. The attribute is added by the kramdown
library if I use the correct syntax in markdown ({: project="logbook"}
).
There’s a ruby file that parses all the log markdowns and builds these files up.
The build process is in a custom script called ./build
which I can call locally,
or from GitHub Actions. Then, I can use the GitHub Pages actions to upload the built
artifacts and get them shipped to the GitHub pages site. Because I already have the CNAME for
katestud.dev
set up, logbook gets deployed to that same domain.
I added some really basic styling for now. I was planning to look for a template but I was inspired by someone at Recurse Center to style the site however I want. For now, it’s a very basic (and somewhat ugly) basic site with centered content, light blue glowing background, and a fun font. I want to add some more pizazz here, like adding a toggle to switch between two color modes, and mess with the padding a bit. But that can all come tomorrow or a later day.
Some other recommendations / inspiration for styling:
I picked this back up, too, and learned a few things:
machine.ADC(<pinnumber>).read_u16()
. Convert the binary number to a voltage number by calculating the slope.