In my work to recreate my 11ty blog on micro.blog I wanted a better search experience for readers, and also myself when searching for posts to link to. Manton did a great job with his search page plugin, so I adapted this to be able to appear on any page.
This plugin for micro.blog will allow you to add a search bar to any page you wish.
This plugin is available from the micro.blog plugin page, or feel free to install it from Github by clicking design, edit theme, and then add new plugin.
Call the plugin anything you wish, copy in the URL from the Github page, and click Add Plugin.
Add the partial to the page you wish this to show on, for example, I have placed this on my home page but you could do this wherever you like.
Simply add {{ partial “search.html” . }}
to your page and the search bar will show as 100% width of the element it is placed in.
When searching, an HTML element will appear and show the results, linking to pages that contain the searched for words.
You can customise the number of results shown on your page by heading into plugin options and changing the default from 5.
The styling of the search bar will be depend on your theme, I have added in some basic styling as follows.
.field {
width: 100%;
height: 34px;
border: 2px solid #eee;
padding-left: 10px;
margin-top: 20px;
margin-bottom: 20px;
border-radius: 11px;
}
#list_results {
padding: 2rem;
border-radius: 11px;
box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}
.field
is the search box itself.
#list_results
is the results box that only shows when search results are found.
The basis of this plugin came from Manton search page plugin.
Oh I do like to be beside the seaside! It might have looked warm but the wind was really cold, but we went over to see some family and I wondered around with my Richo GRiiix as usual.
It was a mere few weeks ago when returning from a run that I thought I’d recovered myself. I felt renewed, full of energy and positivity, as I did before all these issues started. I couldn’t help but smile at the thought that all the stress and strain left by personal issues seemed to have gone, and the world seemed right again.
Perhaps it is the fact I am reading The Comfort Crisis by Michael Easter, but I have begun to realise why I feel much better. I have had some stress and hardship to overcome in the form of my marathon training, and it has given me some clarity. Every Saturday for far too long, I’ve had long runs of increasing mileage to get through that have filled me with dread. I’ve put a brave face on them, but some have been seriously tough and left my questioning my ability to finish. Yet, after finishing them, and perhaps after my muscles have calmed down a bit, I feel wonderful.
I am reminded of a Joe Rogan comment when asked about all the controversy has faced in COVID-19 (and rightly so) and if it caused him stress. When he endures ‘torture sessions’ in his workouts it makes enduring other things much easier. Reading Michael Easter’s book convinced me he’s dead right. When I’ve slogged away for more than 3 hours running, the rest of my day seems a doddle in comparison. Even beforehand, I’m focused on the upcoming stress of the run that everything else pales in comparison, and that gives me focus.
In my life I have already endured quite a few things both personal and family related, but I also realise that going for a run or doing something hard doesn’t solve the stresses of those less fortunate. This is more an observation of the things that improve my mental health and outlook on life. It may work for you, too. There’s something about doing something taxing, and getting to the end, that fills the soul.
Charlie Warzel with an interesting thread on Threads:
the bigger thing is it touches on a gut feeling we all have: so much has changed technologically in a short amt of time! We know this connectivity is working on us, but it’s challenging to pin down exactly how.
This thread was linked by this week’s Platformer that discusses the recent book by Jonathan Haidt on the links between anxiety and social media. Something I wrote about in passing a few days ago because it seems to be the talk of the media industry at the moment.
Casey Newton interviewed Haidt on Hardfork a few weeks ago and followed up with some rebuttals the following episode. I thought the interview came across very well, but it’s important to never take those spouting research on podcasts at face value. Science isn’t always as straightforward as it can be presented as, especially when so many are covered in such a little time.
Whoever you listen to regarding the research, Charlie rightly points that we all have this gut feeling that social media isn’t good for us. If you take a break from scrolling, even for a short period of time, you start to feel better. Our brains are simply not made for the sensory overload. It’s just a question of how much and what the effects actually are—something that may never be completely proven.
Sure, you can make the web boring, and it’s great for a bit. I experience renewed concentration levels and suddenly gain more inspiration for blog posts. There comes a point when you wonder why you ever use the social web, but it becomes apparent a little later on. There’s little point if you get nothing back.
The rather depressing fact is, much of what I do online is because I like interacting with other people. As I wrote about a few days ago, I have zero friends and rely heavily on platforms to provide this for me. More than this, though, is my love of getting replies. In many ways, the reason I take pictures and write blog posts is for other people’s reactions, and not hearing them sucks.
That is not the sole reason, but it’s a big part of it. A blog without a way for people to reply easily is a bit of a downer. I could start tracking analytics and worry about page views, etc. Perhaps look at a comments section or reply by email. These are all great ideas, but the easiest thing to do is share the things I do online. Unfortunately, I have begun to realise that Micro.blog may be the best way to achieve this by being able to share once and post to different places.
Doh!