“Open source your stuff”, that is what one of the IndieWeb principles states. So why not? The development of this website and most of its predecessors was usually accompanied by a workflow that utilized git. The repository was hosted in different places, but I ended up hosting most of the code on GitHub.

The newest generation of this website is based on Hugo gohugo.io, a kind of content management system which creates static websites from Markdown-based content. So far so good regarding the “open source” part, however, I wanted to keep the content separate. By this, I can keep draft posts and content in another place before it goes public on the web. I solved this with the submodule feature of git.

That’s how it goes:

  • I created a private repository on GitHub.
  • The empty repository was cloned to my development machine.
  • The content of the website was moved from the “content” folder to the new repository.
  • The changes were committed in both repositories (code vs. content)
  • Then, I moved to the project repository where the now empty “content” folder resides and added the content repository as submodule with the following command:
git submodule add https://github.com/michaelhuelsen/MY-CONTENT-REPO content

Hence, I can develop locally in one project and changes are committed to different repositories.