diff --git a/brainsteam/config.toml b/brainsteam/config.toml
index 3a38eaf..20a4987 100644
--- a/brainsteam/config.toml
+++ b/brainsteam/config.toml
@@ -17,6 +17,9 @@ webMentionAPIKey = "f61bf-RG1k4uZT3fVLDoIw"
googleAnalytics = "UA-186263385-1"
+[outputs]
+ home = ["HTML", "RSS", "JSON"]
+
[permalinks]
'/' = '/:year/:month/:filename/'
diff --git a/brainsteam/content/posts/2022/01/08-01-wakapi-tracking/index.md b/brainsteam/content/posts/2022/01/08-01-wakapi-tracking/index.md
new file mode 100644
index 0000000..b4c4024
--- /dev/null
+++ b/brainsteam/content/posts/2022/01/08-01-wakapi-tracking/index.md
@@ -0,0 +1,16 @@
+---
+title: Wakapi Time Tracking
+type: post
+description: Playing with Wakapi - a time tracking server that plays nicely with wakatime
+resources:
+ - name: feature
+ src: images/wedding.jpg
+date: 2022-01-08T09:05:11+00:00
+url: /2022/01/08/wakapi-time-tracking
+tags:
+ - open-source
+---
+
+This week I spotted a social media post about [wakapi](https://wakapi.dev/) which is an open source implementation of the [WakaTime](https://wakatime.com/) time tracking server software (which up until that point I hadn't heard of). The thing that interests me about these solutios that they're kind of developer focussed and tell you things like which project you had open, what programming language(s) you spent most time reading/writing and so on. Wakatime also have nice easy install-and-forget plugins for a [BUNCH of IDEs](https://wakatime.com/plugins) including VSCode (where I spend most of my professional working day), NeoVIM, PyCharm and others. All of the plugins have open source (generally seems to be BSD 3-clause) licensing.
+
+I'm quite interested in tracking where my time is being spent - both in my personal hobbyist/phd dev activities and also
\ No newline at end of file
diff --git a/brainsteam/content/search.md b/brainsteam/content/search.md
new file mode 100644
index 0000000..19045a6
--- /dev/null
+++ b/brainsteam/content/search.md
@@ -0,0 +1,52 @@
+---
+title: "Search Results"
+sitemap:
+ priority : 0.1
+layout: "search"
+url: /search
+---
+
+
+This file exists solely to respond to /search URL with the related `search` layout template.
+
+No content shown here is rendered, all content is based in the template layouts/page/search.html
+
+Setting a very low sitemap priority will tell search engines this is not important content.
+
+This implementation uses Fusejs, jquery and mark.js
+
+
+## Initial setup
+
+Search depends on additional output content type of JSON in config.toml
+\```
+[outputs]
+ home = ["HTML", "JSON"]
+\```
+
+## Searching additional fileds
+
+To search additional fields defined in front matter, you must add it in 2 places.
+
+### Edit layouts/_default/index.JSON
+This exposes the values in /index.json
+i.e. add `category`
+\```
+...
+ "contents":{{ .Content | plainify | jsonify }}
+ {{ if .Params.tags }},
+ "tags":{{ .Params.tags | jsonify }}{{end}},
+ "categories" : {{ .Params.categories | jsonify }},
+...
+\```
+
+### Edit fuse.js options to Search
+`static/js/search.js`
+\```
+keys: [
+ "title",
+ "contents",
+ "tags",
+ "categories"
+]
+\```
\ No newline at end of file
diff --git a/brainsteam/static/js/fuse.min.js b/brainsteam/static/js/fuse.min.js
new file mode 100644
index 0000000..7bd82e1
--- /dev/null
+++ b/brainsteam/static/js/fuse.min.js
@@ -0,0 +1,9 @@
+/*!
+ * Fuse.js v3.2.0 - Lightweight fuzzy-search (http://fusejs.io)
+ *
+ * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
+ * All Rights Reserved. Apache Software License 2.0
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ */
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Fuse",[],t):"object"==typeof exports?exports.Fuse=t():e.Fuse=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=8)}([function(e,t,r){"use strict";e.exports=function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r","
"],col:[2,"
"],tr:[2,"","
"],td:[3,"
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n"," ").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0
No matches found
"); + } + }); +} + +function populateResults(result){ + $.each(result,function(key,value){ + var contents= value.item.contents; + var snippet = ""; + var snippetHighlights=[]; + var tags =[]; + if( fuseOptions.tokenize ){ + snippetHighlights.push(searchQuery); + }else{ + $.each(value.matches,function(matchKey,mvalue){ + if(mvalue.key == "tags" || mvalue.key == "categories" ){ + snippetHighlights.push(mvalue.value); + }else if(mvalue.key == "contents"){ + start = mvalue.indices[0][0]-summaryInclude>0?mvalue.indices[0][0]-summaryInclude:0; + end = mvalue.indices[0][1]+summaryInclude