Skip to content

Website for and source code accompanying Hugo In Action


Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit



5 Commits

Repository files navigation

Hugo In Action

Code Sections

The branches in this repository correspond to the sections of Hugo In Action. Each chapter also has a branch with all the resource files that can used to build the Acme Corporation website following the steps as discussed in the book.

Branch / Code Section Book Section Changes URL Delta
Chapter 2 Resources
chapter-02-01 2.1 Create Website skeleton N/A N/A
chapter-02-02 2.2 Added theme - Eclectic chapter-02-01..chapter-02-02
chapter-02-03 2.3.1 Add configuration to the website chapter-02-02..chapter-02-03
chapter-02-04 2.3.3 Added content - index, about, contact, privacy and terms of use page for the website. chapter-02-03..chapter-02-04
chapter-02-05 2.6 Update to theme universal. chapter-02-04..chapter-02-05
Chapter 3 Resources
chapter-03-01 3.1.2 Added block formatting (and first version of chapter-02-05..chapter-03-01
chapter-03-02 3.1.3 Added inline formatting & updates to the privacy policy page chapter-03-01..chapter-03-02
chapter-03-03 3.2 Added HTML characters, tables, task lists, code blocks and definition lists chapter-03-02..chapter-03-03
chapter-03-04 3.6.1 Add YAML metadata. chapter-03-03..chapter-03-04
chapter-03-05 3.6.2 Add data-driven example. chapter-03-04..chapter-03-05
chapter-03-06 3.7 Test out Universal. chapter-03-05..chapter-03-06
Chapter 4 Resources
chapter-04-01 4.1 Split config file. chapter-03-06..chapter-04-01
chapter-04-02 4.2.1 Added blog entries. chapter-04-01..chapter-04-02
chapter-04-03 4.2.2 Adding menu entries. chapter-04-02..chapter-04-03
chapter-04-04 4.3.1 Adding page bundles. chapter-04-03..chapter-04-04
chapter-04-05 4.3.2 Adding branch bundles. chapter-04-04..chapter-04-05
chapter-04-06 4.3.3 Added cover images. chapter-04-05..chapter-04-06
chapter-04-07 4.4 Adding tags and categories to various blog posts. chapter-04-06..chapter-04-07
chapter-04-08 4.4 Add index page for categories and for the design category. chapter-04-07..chapter-04-08
chapter-04-09 4.4 Update taxonomy and convert manufacturing process to a series. chapter-04-08..chapter-04-09
chapter-04-10 4.5 Add youtube video chapter-04-09..chapter-04-10
chapter-04-11 4.6.1 Add divider shortcode chapter-04-10..chapter-04-11
chapter-04-12 4.6.2 Use shared shortcode productInfo. chapter-04-11..chapter-04-12
Chapter 5 Resources
chapter-05-01 5.1.1 Using variables to access content. chapter-04-12..chapter-05-01
chapter-05-02 5.1.2 Use 'if' checks for existence. chapter-05-01..chapter-05-02
chapter-05-03 5.1.3 Falling back to the website title. chapter-05-02..chapter-05-03
chapter-05-04 5.1.4 Using variables. chapter-05-03..chapter-05-04
chapter-05-05 5.1.5 Using defaults and $.Param. chapter-05-04..chapter-05-05
chapter-05-06 5.1.6 Using the 'with' conditional. Add footer chapter-05-05..chapter-05-06
chapter-05-07 5.1.7 Use humanize and markdownify functions chapter-05-06..chapter-05-07
chapter-05-08 5.1.8 Adding markdown content to the index page. chapter-05-07..chapter-05-08
chapter-05-09 5.2.1 Remove hard coded links and add menus as a section, header and footer chapter-05-08..chapter-05-09
chapter-05-10 5.2.2 Added a list of recent blog posts to the home page. chapter-05-09..chapter-05-10
chapter-05-11 5.3.1 Added testimonials based on front matter. chapter-05-10..chapter-05-11
chapter-05-12 5.3.2 Rendering and allowing data from tables. chapter-05-11..chapter-05-12
chapter-05-13 5.4.1 Added price shortcode. chapter-05-12..chapter-05-13
chapter-05-14 5.4.2 Added repeat shortcode. chapter-05-13..chapter-05-14
chapter-05-15 5.4.3 Added archetypes chapter-05-14..chapter-05-15
Chapter 6 Resources
chapter-06-01 6.1.1 New Content type - modern. chapter-05-15..chapter-06-01
chapter-06-02 6.1.3 Add baseof.html and split out the base template with default implementation. chapter-06-01..chapter-06-02
chapter-06-03 6.1.4 Moving terms of use to modern type. chapter-06-02..chapter-06-03
chapter-06-04 6.1.4 Moving the footer/main menu to the base template. chapter-06-03..chapter-06-04
chapter-06-05 6.2.1 Render footer menu using partials in the footer and intro sections. chapter-06-04..chapter-06-05
chapter-06-06 6.2.2 Reduce the scope of the context variable to the menu partial chapter-06-05..chapter-06-06
chapter-06-07 6.2.2 Reuse the partial for the header menu. chapter-06-06..chapter-06-07
chapter-06-08 6.2.3 Render submenus. chapter-06-07..chapter-06-08
chapter-06-09 6.2.4 Move the privacy policy to modern. chapter-06-08..chapter-06-09
chapter-06-10 6.2.4 Enable partialCached with excessive caching(broken). chapter-06-09..chapter-06-10
chapter-06-11 6.2.4 Add additional arguments to fix partialCached. chapter-06-10..chapter-06-11
chapter-06-12 6.2.5 Move shortcode to partialCached to speed up. chapter-06-11..chapter-06-12
chapter-06-13 6.3.1 Move index.css to the assets folder. chapter-06-12..chapter-06-13
chapter-06-14 6.3.1 Use SCSS compilation for index.(s)css. chapter-06-13..chapter-06-14
chapter-06-15 6.3.1 Using color from the parameters. chapter-06-14..chapter-06-15
chapter-06-16 6.3.1 Changing the theme color. chapter-06-15..chapter-06-16
chapter-06-17 6.3.1 Use resources.concat to merge multiple resources. chapter-06-16..chapter-06-17
chapter-06-18 6.3.1 Add hero image for home page. chapter-06-17..chapter-06-18
chapter-06-19 6.3.2 Add cover images for blog posts. chapter-06-18..chapter-06-19
chapter-06-20 6.3.2 Image resizing for optimized loading chapter-06-19..chapter-06-20
chapter-06-21 6.3.2 Dynamically recolor the favicon. chapter-06-20..chapter-06-21
chapter-06-22 6.3.2 Create card layout for the company products. chapter-06-21..chapter-06-22
chapter-06-23 6.5.0 Add metadata via internal templates. chapter-06-22..chapter-06-23
chapter-06-24 6.5.0 Using '.TableOfContents' method to fill table of contents. chapter-06-23..chapter-06-24
Chapter 7 Resources
chapter-07-01 7.1.2 Change the CSS class of the news section using the path check. chapter-06-24..chapter-07-01
chapter-07-02 7.1.4 Adding blog layout and overriding the blog section with this new layout. chapter-07-01..chapter-07-02
chapter-07-03 7.1.5 Added configuration for related pages provided by Hugo. chapter-07-02..chapter-07-03
chapter-07-04 7.2.1 Provide the index page template 'list.html' to blog/community pages. chapter-07-03..chapter-07-04
chapter-07-05 7.2.2 Support Pagination in the index/list pages chapter-07-04..chapter-07-05
chapter-07-06 7.2.4 Listing subsection content on the index page chapter-07-05..chapter-07-06
chapter-07-07 7.2.4 Temporarily switch the index to list layout by removing the index template chapter-07-06..chapter-07-07
chapter-07-08 7.3 Move category taxonomy to content type Acme. chapter-07-07..chapter-07-08
chapter-07-09 7.3.1 Added terms.html. chapter-07-08..chapter-07-09
chapter-07-10 7.3.2 Added the taxonomy layout chapter-07-09..chapter-07-10
chapter-07-11 7.4.1 Moving all pages to content type modern. chapter-07-10..chapter-07-11
chapter-07-12 7.4.1 Creating a new theme named Acme chapter-07-11..chapter-07-12
chapter-07-13 7.4.2 Change the content type to default. chapter-07-12..chapter-07-13
chapter-07-14 7.4.2 Cleanup the theme and move blogs from layouts to a new content type. chapter-07-13..chapter-07-14
chapter-07-15 7.4.3 Provide placeholder resources for the theme to become independent. chapter-07-14..chapter-07-15
chapter-07-16 7.4.3 Testing the theme with chapter 4 content chapter-07-15..chapter-07-16
chapter-07-17 7.4.3 Revert the chapter 4 content test. chapter-07-16..chapter-07-17
chapter-07-18 7.5 Adding a content view for news and blog sections. chapter-07-17..chapter-07-18
Chapter 8 Resources
chapter-08-01 8.3 Added theme Eclectic via Hugo Modules. chapter-07-18..chapter-08-01
chapter-08-02 8.4 Move shortcodes into website for theme portability and enable theme Universal. chapter-08-01..chapter-08-02
chapter-08-03 8.5 Using a specific version of a module (and moving to theme Acme) chapter-08-02..chapter-08-03
chapter-08-04 8.6 Creating a vendor folder. chapter-08-03..chapter-08-04
chapter-08-05 8.7 Using the replace directive for local development. chapter-08-04..chapter-08-05
chapter-08-06 8.8 Add a dependency on the AcmeSupport repository. chapter-08-05..chapter-08-06
chapter-08-07 8.9 Using hugo debug utils plugin. chapter-08-06..chapter-08-07
chapter-08-08 8.10 Moving shared code between the theme and the website to AcmeCommon chapter-08-07..chapter-08-08
chapter-08-09 8.11 Using Hugo Modules for terms of use and privacy policy pages as content plugins. chapter-08-08..chapter-08-09
chapter-08-10 8.12 Running hugo mod tidy chapter-08-09..chapter-08-10
Chapter 9 Resources
chapter-09-01 9.2.3 Embedding tweet using the twitter OEmbed API and getJSON in Hugo chapter-08-10..chapter-09-01
chapter-09-02 9.2.4 Providing cache lifetime to the tweet. chapter-09-01..chapter-09-02
chapter-09-03 9.3.1 Creating a HTML form for the contact us page. chapter-09-02..chapter-09-03
chapter-09-04 9.4.3 Enable Netlify forms chapter-09-03..chapter-09-04
chapter-09-05 9.4.3 Use Formspree for contact us forms chapter-09-04..chapter-09-05
chapter-09-06 9.5 Create dynamic surveys in Hugo chapter-09-05..chapter-09-06
chapter-09-07 9.6.1 Creating a comment form with support for disabling commenting. chapter-09-06..chapter-09-07
chapter-09-08 9.6.2 Rendering past comments by fetching them from the forms service. chapter-09-07..chapter-09-08
chapter-09-09 9.7 Generating Pseudo APIs via custom output formats in Hugo. chapter-09-08..chapter-09-09
Chapter 10 Resources
chapter-10-01 10.2 Doing form submission via JavaScript. chapter-09-09..chapter-10-01
chapter-10-02 10.4.1 Controlling the content shown via the JS code within the HTML template. chapter-10-01..chapter-10-02
chapter-10-03 10.4.2 Splitting the JavaScript code into multiple modules chapter-10-02..chapter-10-03
chapter-10-04 10.4.3 Compile time variables to control flow of the program chapter-10-03..chapter-10-04
chapter-10-05 10.5.3 Showing a search button and loading website data using JavaScript chapter-10-04..chapter-10-05
chapter-10-06 10.5.6 Installing and using Fuse.js for fuzzy search. chapter-10-05..chapter-10-06
chapter-10-07 10.5.7 Properly showing search results. chapter-10-06..chapter-10-07
chapter-10-08 10.5.8 Using Hugo modules with js.Build. chapter-10-07..chapter-10-08
chapter-10-09 10.6 Embedding EasyLogic Editor into the website. chapter-10-08..chapter-10-09
Chapter 11 Resources
chapter-11-01 11.2.7 Creating a function for LaTeX to SVG conversion chapter-10-09..chapter-11-01
chapter-11-02 11.2.10 Render LaTeX based equation during compilation on the Acme Corporation website. chapter-11-01..chapter-11-02
chapter-11-03 11.3.2 Creating a function to trigger Netlify rebuilds on comment submission. chapter-11-02..chapter-11-03
chapter-11-04 11.3.6 Triggering automatic rebuilds from Netlify forms and Formspree comment submissions chapter-11-03..chapter-11-04
chapter-11-05 11.3.7 Using JavaScript to show the comment submission inline to make the perceived performance instantaneous. chapter-11-04..chapter-11-05
Chapter 12 Resources
chapter-12-01 12.1.1 Creating content view for store pages. chapter-11-05..chapter-12-01
chapter-12-02 12.1.2 Creating a simple template for the store pages. chapter-12-01..chapter-12-02
chapter-12-03 12.2 Added shopping cart via JavaScript. chapter-12-02..chapter-12-03
chapter-12-04 12.3.2 Added checkout support. chapter-12-03..chapter-12-04
chapter-12-05 12.3.4 Enable success screen and buy now. chapter-12-04..chapter-12-05
chapter-12-06 12.4 Enable email based fulfillment chapter-12-05..chapter-12-06
Chapter 13 Resources
chapter-13-01 13.1.1 Adding another language to our website. chapter-12-06..chapter-13-01
chapter-13-02 13.1.1 Adding a different image for localized content. chapter-13-01..chapter-13-02
chapter-13-03 13.1.1 Moving french content to a different directory. chapter-13-02..chapter-13-03
chapter-13-04 13.1.1 Added string translation and linking to translate pages in the footer. chapter-13-03..chapter-13-04
chapter-13-05 13.1.2 Add sitemap.xml and robots.txt(disabled) templates. chapter-13-04..chapter-13-05
chapter-13-06 13.1.3 Adding a minimally styled plain format for the website. chapter-13-05..chapter-13-06
chapter-13-07 13.2.1 Support going offline by creating a progressive web app. chapter-13-06..chapter-13-07
chapter-13-08 13.2.2 Added instant page to prefetch links. chapter-13-07..chapter-13-08
chapter-13-09 13.2.3 Added Turbo to make better page transitions. chapter-13-08..chapter-13-09


July 6, 2022 - Fixed some bugs around search results clickability and keyboard handling in chapter 10.

Hugo In Action Website

Netlify Status

The website is hosted from this repository via the branch.