(templates :variables templates-private-directory "~/.spacemacs.d/templates")
11 April 2024
I’ve been playing with Hugo for other sites and liking it a whole lot.
I used it to host my next site, the KC3WWC Amateur Radio Blog. I’ll collect all my notes on amateur radio over there. I had been keeping a running document in org-roam, so it’s now time to make it public.
30 August 2020
I was only trying to write that last article, but it took me days to finally do it. I had so much work to do before I got there.
I had come to appreciate Emacs automatically inserting the boilerplate namespace declarations in new Clojure files, and I really thought I needed such convenience for my blog posts written in AsciiDoc in JBake. I dove down a 20-tab-deep, yak-shaving hole to get it done. [1]
I had to figure out the right search terms
and names for what Emacs was doing for me.
I finally found yatemplate
which seems similar to yasnippets.
Spacemacs
has the templates layer
for integrating yatemplate support,
so I added that layer and created a template
for my adoc
files in my .emacs.d
directory.
My simple case worked,
but I recognized
that I’ll want that template
on all my machines,
so having a local copy of it
wouldn’t cut it.
I needed a way to check-in and version more Emacs/Spacemacs files
than just my ~/.spacemacs
files I was previously distributing.
I learned yasnippets would default
to looking in ~/.spacemacs.d/
if the configuration was in there,
so I had to move my ~/.spacemacs
file
over to ~/.spacemacs.d/init.el
.
To have the templates layer source templates
from the .spacemacs.d
directory,
it required an extra bit of configuration
when introducing it to the dotspacemacs-configuration-layers
:
(templates :variables templates-private-directory "~/.spacemacs.d/templates")
At this point,
I could now commit
my .spacemacs.d
directory
with the regular configuration file
and the supporting templates and snippets.
All those files will be cloned
to all my workstations.
I was almost ready to write
that article,
but yasnippet and yatemplate
have this fancy templating language.
I’m sure that can make
my article-creation even smarter!
I read a bit more
and found a couple cool elisp
functions
for automatically filling in the date
and building a title
from the file name.
With the final enhancements
to my adoc
template,
I could write the article,
if I could only remember
what I was trying to do
in the first place.
I hope to at least remember
how to use these snippets and templates
for future work.
06 April 2017
Since the beginning when I rebuilt my blog with JBake, I intended to split and restyle the photography work from the tech work.
The photo work just disappeared from here, so now it can be found at John Flinchbaugh Photography.
Both sites are rebuilt whenever new content is pushed to their respective git repositories.
03 November 2016
JBake 2.5.0 got support for the MarkupTemplateEngine, so I wanted to give it a try, since structured code will be nicer than extreme scriptlet stuff that was happening in the original Groovy template example. The stock MTE example shows off MTE templates, but it also switched to Foundation in place of Bootstrap.
I’ve been looking forward to really learning Bootstrap for work and my personal projects, so I’m not looking to switch frameworks right now, so I rebuilt my own example project with MTE and Bootstrap based on the original Groovy/Bootstrap sample I had previously used.
Hopefully, I’ll get a little feedback and the JBake people will incorporate my contribution.