Building the Home Page

A typical web page has a skeleton that looks like this:

 <!DOCTYPE html>
 <html lang=​"en-US"​>
  <head>
  <meta charset=​"utf-8"​>
  <title>Title</title>
  </head>
  <body>
 <!-- some content goes here -->
  </body>
 </html>

Every time you create a page, you start with a skeleton such as this and then fill in the body section. Your site will likely have a lot more common elements like navigation, a banner, and a footer. As you build out your site, you end up duplicating all of this content on every page, which is difficult to manage if you do it by hand. That’s why dynamic sites are so popular; they provide mechanisms to reduce duplication by separating the content from the layout.

In a Hugo site, you define layouts ...

Get Build Websites with Hugo now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.