Focustivity
focustivity.blog.web.brid.gy
Focustivity
@focustivity.blog.web.brid.gy
I write about various topics, such as technology, development, self-improvement, and everyday life.

[bridged from https://focustivity.blog/ on the web: https://fed.brid.gy/web/focustivity.blog ]
Adding PageFind search to eleventy (11ty) site
I wanted the ability to search my posts on my site, as I often use it to refer to previous posts that I've published. This capability makes the site more of a repository where I can know I can find previous content. I started with a search on Kagi to see if anyone posted instructions. I immediately found Robb Knights post, Using PageFind with Eleventy for Search. Bingo! I trust Robb's work, so it was a no-brainer. This approach uses Pagefind static site search library, which works with many static-site generators, including Eleventy. However, I did have some slight differences, probably because I'm configuring this for the first time on a newer version of Eleventy. I'm running Eleventy 3.0.0 with ESM. Thanks to Robb's post, and the PageFind documentation that helped me get through this. ## Install Pagefind * I opened Visual Studio Code to my workspace. * Run the `npm install --save-dev pagefind`. ## Tag posts to be indexed Next, we need to indicate to PageFind, which content we want to index. This is optional. I opened my `_includes/layouts/post.njk` template and in my `article` tag, added `data-pagefind-body`. Resulting in If PageFind sees content with the data-pagefind-body tag, it will only index that content and ignore anything else. ## Add the Pagefind search box Next, I added the default Pagefind search UI to my home page. * Open the `content/index.njk` file. * Above my content, added the following code. <div id="search" class="search"></div> <script src="/pagefind/pagefind-ui.js" onload="new PagefindUI({ element: '#search', showImages: false });"></script> ## Run Pagefind locally To test everything locally, run `npx -y pagefind --site _site` from the terminal. Change _site to the name of your output directory. This will create the `pagefind` directory with your output files. Run npx @11ty/eleventy --serve to view your site locally. If you added the Pagefind to you home page, it should show the search box. ## Run Pagefind Indexing Automatically To run Pagefind automatically every time I build my site, I opened my package.json file and under scripts, I updated my existing `build` to the following : `npx @11ty/eleventy && npx -y pagefind --site _site`. This should run the Pagefind index every time the site is built.
focustivity.blog
November 25, 2024 at 5:59 PM
Refactoring Azure DevOps
I've been spending time this week, refactoring our Azure DevOps tenant. We have been using Azure DevOps at my company for as long as I can remember (well over 10 years?), and over time we've used it in different ways. We never had good governance, but would create projects and teams within projects as they come up. For the past several years, we've had one main project in Azure DevOps where we would create a team within the project for each of our actual projects. This allowed us to roll-up all our tasks to the main board, but resulted in us being locked into a single process type, iterations, and more. We would also have separate projects created for each repository we needed. I'm working on breaking away from the consolidated team and using DevOps how I think it was intended. One project per client. Within that project, we'll have teams for each major initiative (most projects only have one). All the repositories for that client are within that same project. This approach allows us to more easily manage team members, permissions, and each project can have its process. In other words, our simple projects can have a simple To Do, Doing, Done type approach, while our bigger projects can have additional states that give us more control. The separate projects will make it easier to have a single Wiki per client, as well as dashboards, control over sprints (when we use them), and much more. Overall, it's pretty easy to move tasks around. Create a query, select the tasks I want to move, right-click and move to project. But it does get tedious. I'm excited for it being done. Maybe a weekend project?
focustivity.blog
November 25, 2024 at 5:59 PM
Whoop Whoop
A few weeks ago, I retired my Apple Watch Series 7 and switched over to the Whoop band. I decided to do this because I was only using my Apple Watch for health reasons, and although the Health app captures a ton of data, it is pretty inconvenient to do anything with it without additional third-party apps. The Whoop subscription is pretty expensive, but my health should be worth it, right? What I like about the Whoop is that, in addition to all the great data it captures, the app actually provides useful insights and suggestions. For example, it will tell me based on my sleep what my strain goal should be that day. Sometimes it's higher, sometimes it's pretty low. It depends on how I feel. The goal is to meet the strain goal in order to at least maintain my fitness, and exceed it to improve fitness. When I start a workout, the app shows me exactly what my target is. I love it. The Whoop app also has some strength training included, which I want to try soon. Supposing, you can pick a prebuilt workout, or create your own, and it will track your reps and sets and tell you your muscle load. I'll try it out this week, and if I remember, share my results. I also like how Whoop provides you with weekly and monthly progress reports. The reports include how various habits, which you track in your daily journal in the app, impact your health. For example, reading for 30 minutes before going to sleep helps me sleep better, rather than 30 minutes of doom-scrolling on social media, does the opposite.
focustivity.blog
November 25, 2024 at 5:59 PM
Refactoring Azure DevOps
I've been spending time this week, refactoring our Azure DevOps tenant. We have been using Azure DevOps at my company for as long as I can remember (well over 10 years?), and over time we've used it in different ways. We never had good governance, but would create projects and teams within projects as they come up. For the past several years, we've had one main project in Azure DevOps where we would create a team within the project for each of our actual projects. This allowed us to roll-up all our tasks to the main board, but resulted in us being locked into a single process type, iterations, and more. We would also have separate projects created for each repository we needed. I'm working on breaking away from the consolidated team and using DevOps how I think it was intended. One project per client. Within that project, we'll have teams for each major initiative (most projects only have one). All the repositories for that client are within that same project. This approach allows us to more easily manage team members, permissions, and each project can have its process. In other words, our simple projects can have a simple To Do, Doing, Done type approach, while our bigger projects can have additional states that give us more control. The separate projects will make it easier to have a single Wiki per client, as well as dashboards, control over sprints (when we use them), and much more. Overall, it's pretty easy to move tasks around. Create a query, select the tasks I want to move, right-click and move to project. But it does get tedious. I'm excited for it being done. Maybe a weekend project?
focustivity.blog
November 16, 2024 at 1:42 AM
Meditations for Mortals by Oliver Burkeman
I finished reading Meditations for Mortals by Oliver Burkeman. The book is an expansion of Oliver's essays from his newsletter, The Imperfectionist. Yet, it doesn't flow like a series of separate essays, but rather they build upon one another. A few lessons stood out to me as they “hit the nail on the head” when it comes to my life. In the past, I've been the type to have a massive task list, where all of my tasks were neatly categorized and tagged with duration, context, start and due dates. In the end, I spent more time organizing my work rather than doing it. I grew out of this years ago, but I still remember the experience. Oliver talks about this in the book. > "The main point - though it took me years to realize it - is to develop the willingness to just do something, here and now, as a one-off, regardless of whether it's part of any system or habit or routine." - Oliver Burkeman Oliver also recommends treating your task list as a source of things you could do, not have to do. > "Treat your to-do list as a menu. In the striving towards sanity mindset, a to-do list is always something you've got to get to the end of before you're allowed to relax. But in any context where there are more things that feel like they need doing than there's time available in which to do them — which is the normal state of affairs, after all — a to-do list is by definition really a menu, a list of asks to pick from, rather than to get through." - Oliver Burkeman He also gets into content curation. I've been caught in the trap of subscribing to a ton of content through RSS and newsletters, then to feel like I need to empty my list. The things I have not read haunt me. I've only recently overcome this, but still struggle with the FOMO. > "Treat your to-read pile like a river, not a bucket. That is to say: think of your backlog not as a container that gradually fills up, and that it's your job to empty, but as a stream that flows past you, from which you get to pick a few choice items, here and there, without feeling guilty for letting all the others float by." - Oliver Burkeman Oliver has some interesting things to say about decision-making and perfectionism. > "Perfectionists love to begin new endeavors, because the moment of starting belongs to the world of limitlessness: for as long as you haven't done any work on a project, it's still possible to believe that the end result might match the ideal your mind." - Oliver Burkeman The examples above are a few that stood out to me, but there are many, many more. Overall, the book is structured into 28 days, one lesson per day. Oliver recommends doing one lesson per day, and then let it resonate with you. Think about that lesson and how it applies to your life. Meditations for Mortals should be on everyone's bookshelf. It is full of advice about how to live life, knowing that we can't get everything done and do everything we want to do.
focustivity.blog
November 12, 2024 at 9:42 PM
Adding PageFind search to eleventy (11ty) site
I wanted the ability to search my posts on my site, as I often use it to refer to previous posts that I've published. This capability makes the site more of a repository where I can know I can find previous content. I started with a search on Kagi to see if anyone posted instructions. I immediately found Robb Knights post, Using PageFind with Eleventy for Search. Bingo! I trust Robb's work, so it was a no-brainer. This approach uses Pagefind static site search library, which works with many static-site generators, including Eleventy. However, I did have some slight differences, probably because I'm configuring this for the first time on a newer version of Eleventy. I'm running Eleventy 3.0.0 with ESM. Thanks to Robb's post, and the PageFind documentation that helped me get through this. ## Install Pagefind * I opened Visual Studio Code to my workspace. * Run the `npm install --save-dev pagefind`. ## Tag posts to be indexed Next, we need to indicate to PageFind, which content we want to index. This is optional. I opened my `_includes/layouts/post.njk` template and in my `article` tag, added `data-pagefind-body`. Resulting in If PageFind sees content with the data-pagefind-body tag, it will only index that content and ignore anything else. ## Add the Pagefind search box Next, I added the default Pagefind search UI to my home page. * Open the `content/index.njk` file. * Above my content, added the following code. <div id="search" class="search"></div> <script src="/pagefind/pagefind-ui.js" onload="new PagefindUI({ element: '#search', showImages: false });"></script> ## Run Pagefind locally To test everything locally, run `npx -y pagefind --site _site` from the terminal. Change _site to the name of your output directory. This will create the `pagefind` directory with your output files. Run npx @11ty/eleventy --serve to view your site locally. If you added the Pagefind to you home page, it should show the search box. ## Run Pagefind Indexing Automatically To run Pagefind automatically every time I build my site, I opened my package.json file and under scripts, I updated my existing `build` to the following : `npx @11ty/eleventy && npx -y pagefind --site _site`. This should run the Pagefind index every time the site is built.
focustivity.blog
November 12, 2024 at 9:42 PM
Meditations for Mortals by Oliver Burkeman
I finished reading Meditations for Mortals by Oliver Burkeman. The book is an expansion of Oliver's essays from his newsletter, The Imperfectionist. Yet, it doesn't flow like a series of separate essays, but rather they build upon one another. A few lessons stood out to me as they “hit the nail on the head” when it comes to my life. In the past, I've been the type to have a massive task list, where all of my tasks were neatly categorized and tagged with duration, context, start and due dates. In the end, I spent more time organizing my work rather than doing it. I grew out of this years ago, but I still remember the experience. Oliver talks about this in the book. > "The main point - though it took me years to realize it - is to develop the willingness to just do something, here and now, as a one-off, regardless of whether it's part of any system or habit or routine." - Oliver Burkeman Oliver also recommends treating your task list as a source of things you could do, not have to do. > "Treat your to-do list as a menu. In the striving towards sanity mindset, a to-do list is always something you've got to get to the end of before you're allowed to relax. But in any context where there are more things that feel like they need doing than there's time available in which to do them — which is the normal state of affairs, after all — a to-do list is by definition really a menu, a list of asks to pick from, rather than to get through." - Oliver Burkeman He also gets into content curation. I've been caught in the trap of subscribing to a ton of content through RSS and newsletters, then to feel like I need to empty my list. The things I have not read haunt me. I've only recently overcome this, but still struggle with the FOMO. > "Treat your to-read pile like a river, not a bucket. That is to say: think of your backlog not as a container that gradually fills up, and that it's your job to empty, but as a stream that flows past you, from which you get to pick a few choice items, here and there, without feeling guilty for letting all the others float by." - Oliver Burkeman Oliver has some interesting things to say about decision-making and perfectionism. > "Perfectionists love to begin new endeavors, because the moment of starting belongs to the world of limitlessness: for as long as you haven't done any work on a project, it's still possible to believe that the end result might match the ideal your mind." - Oliver Burkeman The examples above are a few that stood out to me, but there are many, many more. Overall, the book is structured into 28 days, one lesson per day. Oliver recommends doing one lesson per day, and then let it resonate with you. Think about that lesson and how it applies to your life. Meditations for Mortals should be on everyone's bookshelf. It is full of advice about how to live life, knowing that we can't get everything done and do everything we want to do.
focustivity.blog
November 4, 2024 at 5:42 PM