Top Level Modules — Index Page in 3 Columns

Hotdogs with Scattered Condiments

Markup Modules

Markup modules return a bit of markup. Each of these modules live as a subfolder of app/modules/markup/. Most websites will have many markup modules.

Scattered Hotdogs

Page Module

The Page module is located at app/modules/pages/. Top level HTML pages contain almost no content other than a call to the Pages module. The Pages module sets a number of global variables and then calls all the other modules needed to build the top level HTML page.

Hotdogs

Nav Module

Navigation is always an important website feature. The Nav module returns the markup necessary for both desktop and mobile navigation. Sometimes, nav markup will be used for headers, and sometimes for sidebars and footers. But, with a nav module, it all comes from the same source of data.

Dressed Hotdogs

Elements Module

Websites usually have pieces of markup that don’t deserve a whole module — they need to be served via something akin to a traditional include. It can still be handy to separate them into a separate file and allow them to use global variables. I use a special Elements module for this purpose.

Plate with a Coke, French Fries, Ketchup, and Assorted Others

Tech Module

The Tech module builds the <head> section and the non-displaying “foot” section of a web page. This is where metatags, stylesheets, font links, keywords, analytics, and javascripts are placed.