Cloning Custom Themes

At some point, I wanna talk pulling from GitHub when it comes to custom themes and/or plugins that are cloned in creation. With all my tinkering I created a repository for my custom theme so that I wouldn’t lose track of what was working (version control, am I right?). After finally remembering I needed to make the repository public (doh) I can easily clone my repository to create a new theme. What I can’t do (correct me if I am wrong), is keep tinkering with my theme, push to GitHub, and then pull the changes to update on Micro.blog. Long story short, I am still copy/pasting, etc. between my repository and my original custom theme. Feels like an obvious future feature for dev heads like myself.

Something that I’ve been doing is version my theme on Micro.blog and pull changes from an existing repo into that.

For example:
If I had a theme named “Elephant”, I would clone the repo using Micro.blog into a theme called “Elephant v1”. Then, as I make updates and fix bugs and add features, I version the theme “Elephant v2”, etc. This way it busts the caching that M.b has. The older versions of the theme can be deleted on M.b.

Perhaps in the future M.b will have an option to pull in new updates as you make them on Github, until then, this works for me.

1 Like

Appreciated: coming back to this once I wake up.

Okay, I give. How do I get one of these posts bookmarked under my discourse profile?

So far I’ve only been able to bookmark entire threads. I assume this is some sort of setting for the forum but it would be good to have access to the feature.

1 Like

Thanks for the suggestion. I am slogging through the ∞ settings in Discourse, but couldn’t find an answer to this. Will keep looking, and would gratefully accept a link from anyone who knows if this is possible.

I’ve wanted this desperately, but since, as you wrote in your post, M.b and Hugo are different enough, it became untenable for me to maintain and test things separately.

FWIW, you can implement a theme as a plugin, basically, and that will pull from Github. I think the tech is there or should be there to do something pretty similar.

A button to just resync a theme would make a huge difference here, but I like the suggestion to increment the version numbers.

That said, that approach would be easier if there was a way to locally test Micro.blog with Hugo. Because every change would end up needing to be synced, I’m finding it easier to just make changes in the backend and then copy and paste those changes into version control. Makes me a little sad as a dev though.

1 Like