Posts


Other Views: By Month | By Category | By Tag Cloud


Hugo - Selectively Add Table of Contents to Post

When you are doing a longer tutorial style post, it is helpful to include a table of contents that will show all of the headings in the post and link to that portion of the post. In this post, we will look at how you can selectively add a table of contents to a post.

Read More


Hugo - Open External Links in a New Tab

For Hugo based websites, when a link goes to an external website, I prefer to have them open in a new browser tab.

Read More


Hugo - Create Custom Shortcodes

In our previous post, we took a look at Hugo shortcodes which are HTML snippets that you can use as a way to extend the html that is generated by Hugo. There are several shortcodes built-in to Hugo but you can also easily create your own custom shortcodes. In this post, we are going to take a look at how to create our own shortcode.

Read More


Hugo - Use Shortcodes Instead of Embedding HTML in Your Markdown

Welcome back to the Hugo series. In our last post, we added an RSS feed to our site. In this post, we are going to look at how to extend the output of the HTML that is generated by Hugo for a post.

When creating a post, there are times where you really wish Hugo could render something fancier than the basic HTML that markdown to html provides. Maybe you want to add a caption to an image or embed a YouTube video or include a gist. You could embed the HTML within your markdown file, but that makes your markdown file messy, harder to read, and a bit of a pain if you need to update the HTML across all your posts.

This is where Hugo shortcodes come into play. Shortcodes are simply a way of inserting a snippet of HTML into a page from your markdown.

Let’s take a look at how to use the built-in shortcodes.

Read More


Hugo - Create RSS Feed for Site

If you have a Hugo site, you probably already have a working RSS feed. You just might not know about it!

Hugo comes with a built-in RSS Template that generates the necessary RSS XML for you. Often, this internal template is good enough, and you just need to include the feed links in the correct places.

Read More


Hugo - View Posts by Tag Cloud

In our previous post on Hugo, we created a page to view the post grouped by category and a page to view all posts for a category.

In this post, we are going to build a similar post list page but this time we are going to look at the list using a tag cloud. A tag cloud is a visual representation of our categories using font size and weight to highlight which categories have more posts.

example tag cloud:

example tag cloud

Read More


Hugo - View Posts Grouped by Category

In our previous post, we create a page to view our posts grouped by month. In this post, we are going to create a page to show post grouped by category.

Example of What We Are Building:

example of page

Read More


Hugo - View Posts Grouped By Month

In our previous post, we looked at how to build an archive page to view all of the posts we have written. In this post, we will build an archive page that shows our posts by month.

Example of What We Are Building:

example of page

Read More


Hugo - Create Page to View All Your Posts

In our post on Creating Your Blog Using Hugo, the theme that I provided you included the archive page that allows you to page through all of the posts you have written. By default, Hugo only shows 10 posts at a time and then you need to have an archive page that pages through the remaining posts. Even though I provided you with the archive page, I want to examine how that page works so you know how you can customize the page to match the look and feel you want.

Read More


Hugo - Deploy Staging Test Site with Netlify

In our previous post on Deploying a Preview Release of Site Using Netlify, we set up Netlify to build and deploy a preview of our site every time we created or updated a pull request that also included all of our draft and future posts.

In this post, we will look at how to deploy a git branch every time a commit is pushed to the branch to test out what our production site will look like before deploying to production. Unlike the preview deploy in the last post, the staging deployment will not include draft and future posts and mirror the production site configuration.

Read More