3 Using markup for content

 

This chapter covers

  • Creating content using Markdown
  • Using Hugo’s extensions to Markdown
  • Understanding the markup languages supported by Hugo
  • Using YAML for metadata in a Hugo-based website
  • Playing with the various elements of the front matter

Most documents in the content folder of a Hugo website consist of textual content in a markup language and its associated metadata in a metadata language. Markdown is the most popular markup language and the most widely used. YAML is among the most popular languages for writing key-value configurations, where human readability is essential.

Figure 3.1 (top) shows the focus area for this chapter. In sections 3.1 to 3.3, we will focus on the Markdown language to provide content, and from section 3.4 onward, we will study the YAML language that adds the metadata. We will also look at the typical metadata entries in the front matter of a website. In this chapter, we will format the pages we created for the website we built for Acme Corporation in chapter 2.

Figure 3.1 Most content documents in a Hugo-based website consist of markup in some metadata language like Markdown and structured metadata in a metadata language like YAML. The focus of this chapter is to format a single Markdown document (on the top). The bottom shows a comparison of database storage versus file-based storage for our content.
CH03_F01_Jain

3.1 Writing content in Markdown

3.1.1 Paragraphs in Markdown

3.1.2 Headings, lists, and other block elements

3.1.3 Formatting, inline links, code, and images

3.1.4 HTML

3.1.5 Tables, task lists, and code blocks

3.1.6 Emojis, IDs, and other Hugo extensions

3.2 Markdown in action

3.3 Other markup languages

3.4 Metadata

3.4.1 Comments

sitemap