<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Hugo on clairecodes</title>
    <link>https://www.clairecodes.com/categories/hugo/</link>
    <description>Recent content in Hugo on clairecodes</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-gb</language>
    <lastBuildDate>Thu, 20 Jul 2023 15:50:10 +0100</lastBuildDate>
    
	<atom:link href="https://www.clairecodes.com/categories/hugo/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>How to Group Hugo Posts by Year</title>
      <link>https://www.clairecodes.com/blog/2023-07-20-how-to-group-hugo-posts-by-year//</link>
      <pubDate>Thu, 20 Jul 2023 15:50:10 +0100</pubDate>
      
      <guid>https://www.clairecodes.com/blog/2023-07-20-how-to-group-hugo-posts-by-year//</guid>
      <description>Here&amp;rsquo;s how to group and count posts by year in Hugo, using the GroupByDate function.
Within a list.html layout template:
&amp;lt;ul&amp;gt; {{ range .Pages.GroupByDate &amp;quot;2006&amp;quot; }} &amp;lt;li&amp;gt;There were {{ len .Pages }} posts in the year {{ .Key }}&amp;lt;/li&amp;gt; &amp;lt;!-- You can add another range here to get individual posts, for example: --&amp;gt; &amp;lt;!-- {{ range .Pages.ByTitle }} --&amp;gt; {{ end }} &amp;lt;/ul&amp;gt; &amp;lt;div&amp;gt;There are {{ len .Pages }} total posts.</description>
    </item>
    
    <item>
      <title>Creating Custom Front Matter in Hugo Files</title>
      <link>https://www.clairecodes.com/blog/2021-02-19-creating-custom-front-matter-in-hugo-files//</link>
      <pubDate>Fri, 19 Feb 2021 13:53:44 +0000</pubDate>
      
      <guid>https://www.clairecodes.com/blog/2021-02-19-creating-custom-front-matter-in-hugo-files//</guid>
      <description>Front matter is metadata found at the top of each Markdown post in a Hugo site. Front matter captures data associated with the post and is a powerful tool for personalising your Hugo site. This article explains how to customise the fields in the front matter.
Let&amp;rsquo;s define some Hugo terminology first:
 content type - how Hugo defines and organises your content. For example, creating a file with the command hugo new posts/my-first-post.</description>
    </item>
    
    <item>
      <title>Meta Descriptions in Hugo Templates</title>
      <link>https://www.clairecodes.com/blog/2019-05-03-meta-descriptions-in-hugo-templates//</link>
      <pubDate>Fri, 03 May 2019 15:35:48 +0100</pubDate>
      
      <guid>https://www.clairecodes.com/blog/2019-05-03-meta-descriptions-in-hugo-templates//</guid>
      <description>What is a meta description? A meta description is a summary of a webpage set in an HTML meta tag. It&amp;rsquo;s often displayed by search engines in their results as the page description, so it can have an impact on the page&amp;rsquo;s click-through rate. A relevant meta description can help improve your page&amp;rsquo;s SEO.
&amp;lt;meta&amp;gt; tags are placed within the &amp;lt;head&amp;gt; tag of the document. Order of other meta tags doesn&amp;rsquo;t matter.</description>
    </item>
    
    <item>
      <title>Why my Hugo Archetypes didn&#39;t work</title>
      <link>https://www.clairecodes.com/blog/2019-03-28-why-my-hugo-archetypes-didnt-work//</link>
      <pubDate>Thu, 28 Mar 2019 15:06:50 +0000</pubDate>
      
      <guid>https://www.clairecodes.com/blog/2019-03-28-why-my-hugo-archetypes-didnt-work//</guid>
      <description>A short story about Hugo template files and Markdown file extensions.
Brief overview of archetypes in Hugo The current version of my personal blog is built with Hugo, a static site generator. Hugo has the concept of archetypes, which are template files used to create new content types with the hugo new command. It saves you having to copy and paste customised front matter (the YAML, TOML or JSON data at the top of the file) or other custom content every time you create a new post.</description>
    </item>
    
  </channel>
</rss>