===============
== bacardi55 ==
===============
ἕν οἶδα ὅτι οὐδὲν οἶδα

Moving all my content to a dedicated repo

- Permalink

Today, I decided to over-complicate my deployment workflow… again! Or maybe simplified it… I am not sure 🤣…

Anyway, in a nutshell, what I did is removed content from my blog and capsule repository and instead have one content repository instead.

Previously, I had:

  • a blog repository, containing all hugo (static site generator) related files (template, config, …) as well as the blog posts within content/posts/ and other content in there too (eg: pages, …)
  • a capsule repository, containing all kiln (static capsule generator) related files and the gemlog posts. Similar to the blog one but for my capsule
  • a writting-deployments (with the misspelling yes) repository, containing all the scripts needed to build and deploy both my website and capsule
  • a repository for my custom hugo theme

The issue were that I had content scattered across both the website and capsule repository. That was a bit annoying and then scripts were taking some content from the blog repository (blog posts) to convert them in gemtext (see here) and then take gemlog post from the capsule repo to put them (after some alteration) to my blog.

While this hasn’t fundamentally changed, what I wanted to do is to regroup all content that were supposed to be used both in website and capsule in a single repository.

I did this for 3 reasons:

  • In the (very near) future, I want to move my micro blogging content to my website and/or capsule first and then syndicate elsewhere. I’ll write more about the general idea later, but I want a way to write microblog entries and decide easily where they will be displayed. Having this “content only repo” will help, but I’ll explicit the concept later, when I have it ready. A POC is well underway though :).
  • It bugged me to have them separated (well, I could have live with it but it was still in my mind)
  • Simplify the deployment process. While it doesn’t seem obvious when explaining all this, it made it simpler. If interested, the new script is here and the .build file is there.

From the writing-content repository, the steps are:

  • copy blog post to content/posts/ of the hugo directory
  • copy gemlog posts to content/gemlog/ of the hugo directory, rename them from .gmi to .md, keep the frontmatter and remove the content from them
  • copy gemlog posts to content/gemlog/ of the capsule directory
  • copy blog posts to content/blog/ of the capsule directory after transforming them from markdown to gemtext (using lowdown)

I’m also going to change the gemlog format from now on and add them in markdown instead of gemini. As you may have guessed, I’ll use lowdown to transform them in my script, same way I’m transforming my blog post to gemtext.

Anyway, this post has been written a bit fast compared to others, but I was happy that I made that big change just in a couple of hours :-).

There will be a couple of additional post to this series and hopefully that will be the end of it and this process will stay as is for a long period of time without any further changes :).



Contact

If you find any issue or have any question about this article, feel free to reach out to me via webmentions, email, mastodon, matrix or even IRC, see the About page for details.