Hugo Improve Usability

  • vnull
  • Pub Dec 24, 2022
  • Edited Dec 25, 2022
  • 2 minutes read

Make Site More Informative

Add Reading Time to current theme.

Add Reading Time to list Page

Showing Reading Time is a great addition, by helping visitors to decide if the article is interesting enough to read..ReadingTime is a function of Hugo - which is calculated from the number of words in markdown content.

As this is a built in function, this can added.

Update Theme

This will vary based on theme and files might be different.

Open <theme>/layouts/_defaults/single.html <theme>/layouts/_defaults/post.html and add find author section in geeky-hugo theme location this in:

Author and Publish Date are generated. Notice the <li> </li> section.

<ul class="list-inline card-meta d-flex align-items-center mb-3">
  <li class="list-inline-item d-flex align-items-center">
    <i class="fas fa-user me-2"></i>
    <a href="{{`about` | relLangURL}}/">{{}}</a>
  <li class="list-inline-item d-flex align-items-center">
    <i class="fas fa-calendar me-2"></i>
    <span>{{ time.Format ":date_long" .PublishDate }}</span>

Add the following to include read time.

<span class="reading">{{ .ReadingTime }} {{ cond (eq .ReadingTime 1) "minute" "minutes" }} read</span>

Completed code with clock icon added with <i class="fas fa-clock"></i> just lookup Font Awesome Icons

<li class="list-inline-item d-flex align-items-center">
<i class="fas fa-clock"></i>
  <span class="reading">{{ .ReadingTime }} {{ cond (eq .ReadingTime 1) "minute" "minutes" }} read</span>


Minor update to improve information.

Check out the something interesting:

Hugo running on Android static blog site sync with github

Do you have an idea or suggestion for a blog post? Submit it here!

Related Posts

2023 Phoenix VMUG UserCon

  • vnull
  • Sep 8, 2023
  • 4 minutes read

Introduction: The recent 2023 Phoenix VMUG UserCon brought together some like-minded people in the field, with discussions ranging from VMware technologies to best practices for optimizing existing systems.

Read more

Red Hat User Group Insights, Ansible Automation Platform, and ITSM Integration

  • vnull
  • Jun 1, 2023
  • 3 minutes read

Introduction: This blog post aims to summarize the key takeaways from this informative workshop. At the recent Red Hat User Group workshop on Red Hat Insights, Red Hat Ansible Automation Platform, and their integration with management (ITSM) systems, such as ServiceNow, provided valuable insights into how these technologies work together.

Read more

Robocopy Examples

  • vnull
  • Feb 10, 2023
  • 5 minutes read

Robocopy Examples Robocopy has many command line options and it can be overwhelming to know which commands to use. In this post, we will take a look at how to ues robocopy to copy, mirror, purge Files and Folders.

Read more