Purge git repo history

I mentioned in a previous post that I had used git and git hooks to upload Hugo blog posts to my server, and that I am now using rsync as a faster more succinct alternative. This has left me with lot of git history in my .git folder, which I really don’t need. I don’t think I am ever going to want to recover a blog post version, ever. So I thought why not just delete all the history and reduce the junk in the site directories....

28 March 2023 · 2 min · Mark

Hugo Google-News Error

The Hugo theme template partial google-news has been deprecated for quite some time. A warning message has been posted on build for just that very reason. After the last update of Hugo v0.111.2+extended the partial appears causes Hugo to fail while building. This is the error thrown on my Mac: ❯ hugo Start building sites … hugo v0.111.2+extended darwin/arm64 BuildDate=unknown ERROR 2023/03/07 23:21:02 render of "page" failed: "/Users/mark/websites/markbtomlinson.com/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/single....

8 March 2023 · 2 min · Mark

Git Hooks to Rsync

Getting un-hooked You Git I have been using Git Hooks to sync local Hugo website files to my remote server. This has worked well, mostly, but I wondered if it was the most efficient way of syncing up. I use Git on the local web structure and so have version control. Using Hooks allows me to upload to a remote location and then have the remote server copy the modified file into the live site directory,....

1 March 2023 · 2 min · Mark

Typora Symbolic Links Mac

Unfortunately Symbolic Links and shortcuts don’t work within Typora’s file listing. I found a work around though: Create a symbolic link to the folder you wish to add in the default Typora markdown directory, this will then show up in the the file listing, it won’t do anything though if you click on it, as it isn’t implemented or supported in Typora yet. But, if you right click on the icon link in the file list and choose Open in New Window it will load the linked directories contents....

1 October 2022 · 1 min · Mark

FrontMatter for VSC

I recently set up a addon for Visual Studio Code, for editing Markdown files in HUGO. The addon was from Elio Struyf called FrontMatter. I got it working quickly enough. Although I had problems with the media paths not showing correctly in the media browser. The reason for this was, I’d used the default setting (as mentioned in the documentation) which assumes media will be in the root static folder, where as I had media in an assets folder under the content folder....

1 November 2021 · 1 min · Mark

Git Version Control Setup

After a few false starts I have finally got my Hugo site setup to use git submodule to push the HTML output to the remote webserver. It was a little involved at first, but once I got my head around the idea of a git repo within a git repo, not being a git repo but rather just a folder marked as a submodule of some parent module… you get the idea....

25 October 2021 · 1 min · Mark