Simple site-search for Hugo, using Google

Want a simple search functionality for your Hugo site? Here’s the setup I used here. It uses the Google search advanced query operators (which you can get if you go to Tools / Advanced Search) to add the site as a separate parameter. as_q = the query you want as_sitesearch = the site you want to search in It opens up in a separate window, if you’re ok with that.

Simple site-search for Hugo, using Google »

Some design decisions on this site, SEO and otherwise

Mostly a random collection of decisions I made when revamping this site. I’ll try to update this over time as I make new calls. Hosting Post in markdown. This is mostly for comfort, it’s easier than writing HTML. Minimal CMS. I use Hugo as a static site generator. I thought static site generators would be easy; I was wrong. Hugo uses Go and a bunch of libraries, I can’t install all of it on my company laptop (without disabling some security features, which otherwise seem like a good idea).

Some design decisions on this site, SEO and otherwise »

Converting WordPress and Plog to markdown

Converting HTML to markdown for Hugo isn’t super-complicated, it’s just a bit annoying if you have to do it for a bunch of individual posts. There are a few options documented. (Image to see if SVGs work here. I guess they do.) Wordpress I didn’t want to install new plugins on my aging WordPress installations, so I went for the Python setup ExitWP-for-Hugo. It takes the exported XML file from WordPress and churns out a bunch of .

Converting WordPress and Plog to markdown »

Adding archive.org links to old posts in Hugo

Since there’s so much old content here, I thought I’d add links to archive.org in links in older posts. At least this way people have a chance to see what might have been there earlier. Following adding nofollow in hugo I added the following to the render-link.html file: {{- if strings.HasPrefix $linkurl "http" }} {{- if gt (sub now.Year .Page.Date.Year) 5 }} (<a href="https://web.archive.org/web/{{ .Page.Date.Year }}*/{{ $linkurl }}" {{- with $relval}} rel="{{ trim .

Adding archive.org links to old posts in Hugo »

Using nofollow links in Hugo's Markdown

I seem to have more posts about nofollow links than actual nofollow links, but here’s one more. Markdown doesn’t support nofollow links by default, so you either have to write them in HTML or tweak your template to handle them. Update: after reviewing the options, I ended up using a bounce-URL instead. Nofollow links with HTML This is kinda simple. Just write HTML directly in markdown: anchor <a href="https://example.com" rel="nofollow">anchor</a> Nofollow links with markdown There are probably easier ways to do this, but I didn’t spot any off-hand.

Using nofollow links in Hugo's Markdown »

Converting ancient content into markdown

So you want to get that ancient blog post or article that you put up and convert it into Markdown? This is what has worked for me. YMMV. Find the content Crawl and mirror the site to get everything This is kinda easy, and makes it possible for you to get all of the content that’s linked locally. It doesn’t make viewing them in a browser easy though. This uses wget.

Converting ancient content into markdown »