Search Icon, Magnifying Glass

Marmanold.com


Entries for #Json

Full-Text Search using Hugo & Lunr

Adding full-text search to a statically generated Hugo site is a fairly easy process. As I’ve mentioned before, I’m already using Gulp to compile and minify my site. Using that Gulp file as my starting point, adding full-text search is a simple three-part process.

To enable search, I decided to use the Lunr.js library. Lunr is simple to use and has just the right amount of features for adding some simple search capabilities to your site. To start, you’ll need to create a JSON index of your site for Lunr to use. I put this layout under _default and called it search.json.

Read more...

Posted: , Words: ~500, Reading Time: 3 min

Archiving my Website with Workflow & Hazel

I really enjoy automating things using Workflow, Hazel, shell scripts, or just about anything else.

Last night I got the idea that it would be cool to have a graphical archive of each post to my website as it appeared the day it was posted. Over time I’ll have a visual history of how my website has changed and, who knows, might make a little coffee table book or something.

The automation for this is fairly simple. I took an existing Workflow I had that used the JSONFeed of my site to grab the most recent post and modified it

Read more...

Posted: , Words: ~300, Reading Time: 2 min