What is the most popular Hugo search tool?

What is the most popular Hugo search tool?

I asked ChatGPT “What is the most popular Hugo search tool?” and the answer given was Lunr.js

Here’s the full response:

The most popular search tool for Hugo websites is Lunr.js. It’s a powerful, client-side search engine that is often used with Hugo because of its flexibility, ease of integration, and performance. Lunr.js is a JavaScript-based search library that allows you to implement fast, full-text search capabilities directly in the browser without needing a backend server.

[Read More]

2024 08 20

Can I get some feedback?

I asked ChatGPT for suggestions on how to implement comments on a Hugo static website hosted on GitHub Pages. This led me to implementing Utterances. Can I get some feedback? Let’s hope so!

      <div id="comments">
        <h2>Comments</h2>
        <script src="https://utteranc.es/client.js"
                repo="spr12ian/spr12ian.github.io"
                issue-term="pathname"
                theme="preferred-color-scheme"
                crossorigin="anonymous"
                async>
        </script>
      </div>

Further Reading

ChatGPT Github Pages Hugo Utterances

2024 08 19

I upgraded my Github Actions workflow to use the latest version of Hugo

.github/workflows/hugo.yaml

# Workflow for building and deploying my Hugo blog to GitHub Pages
name: Deploy Hugo site to Pages

on:
  # Runs on pushes targeting the default branch
  push:
    branches:
      - main

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
  group: "pages"
  cancel-in-progress: false

# Default to bash
defaults:
  run:
    shell: bash

jobs:
  # Build job
  build:
    runs-on: ubuntu-latest
    steps:     
      - name: Install Dart Sass
        run: sudo snap install dart-sass
      - name: Checkout
        uses: actions/checkout@v3
        with:
          submodules: recursive
          fetch-depth: 0
      - name: Setup Pages
        id: pages
        uses: actions/configure-pages@v3
      - name: Install Node.js dependencies
        run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v2
        with:
          hugo-version: 'latest'  # Automatically uses the latest Hugo version
      - name: Build with Hugo
        run: |
          hugo \
            --gc \
            --minify \
            --baseURL "${{ steps.pages.outputs.base_url }}/"          
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: ./public

  # Deployment job
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v2

Can I delete 'draft: true'?

As usual my ’to do’ list is too long. My desk is a mess and needs to be tidied/cleaned. I should be doing that rather than typing this.

Adding to my list today:

I’d like to somehow have separate repositories for my Hugo blog and my Hugo setup. I want to be able to have the Hugo setup as a public repository that you, dear reader, can see exactly how it is. I want the actual blog source to be private so that you don’t see the draft posts which I don’t want to be published to the public, that’s you again, at least not yet! As far as I can see acheiving this will require a private repository.

[Read More]

2023 07 25

My husband 👬 says I buy too many gadgets which are a waste of money. He also complains that I give away too many of them.

When I buy a newer version of something and can’t find a use for the older one then I usually use FreeCycle to dispose of the older one.

StaticMan

Highlight.js - Client side syntax highlighting [Params] useHLJS = true

Hugo

Let’s Encrypt is a Hugo site!!!

[Read More]

How do I 'hugo new' remotely, to create new posts?

Today I moan about my Amazon/Aqara disappointment on the Facebook HA UK group, and ask the group what they think I should do.

Hugo

Until now, I was struggling to work out how the home page of the Ananke theme example site displayed the ‘Articles’ link at the top of the page. Adding this line to hugo.toml made a really useful difference:

sectionPagesMenu = 'main'

Thanks to Harry Cresswell for the help.

How do I ‘hugo new’ remotely, to create new posts?

Further Reading

Git Tower Hugo Context Example

[Read More]

Samsung Chronos 7 Laptop

When I bought this Samsung Chronos 7 laptop it had Windows1 installed. It always had a problem with overheating and it was very slow to boot up, but when the battery life dwindled so much that I always have it plugged in then I eventually decided enough was enough. I took a risk and installed Google’s Chrome OS Flex. This OS goes from strength to strength and I couldn’t be more pleased that I decided to install it.

[Read More]

Aqara

Aqara

I ordered a few items during Amazon Prime Day.

  1. Aqara Smart Radiator Thermostat E1 x 2
  2. Aqara Smart Hub E1
  3. Aqara Motion Sensor P1

Only the radiator valves were delivered by Amazon but not the hub or the motion sensor although their website and app say it was all delivered. The valves don’t work without the hub, so I’ll be sending them back because I’d rather not pay full price for the hub and sensor which is what Amazon suggested. Very disappointing.

[Read More]

What inspired this blog?

What inspired this blog?

I’ve been a computer programmer for most of my life1. I’m a fan of Stack Overflow as a great place to ask questions about any problems I bump into while developing code. Recently I’ve been working on Google Apps Script and I noticed one name that often gave me good answers to my question was Tanaike; his page on Medium listed some other scripts that I thought were quite interesting. I liked the look of his about Tanaike web page which prompted me to look behind the scenes on that page. The page was generated by Hugo, and the Hugo theme being used appears to be Blackburn, created by Yoshiharu Yamashita. I had a play with the instructions on the Hugo quickstart page and I quite like how fast it is, even on my dated hardware. The missing detail about the layouts setup took me a little while to work around.

[Read More]