Creating Pages in GenGen
This guide covers everything you need to know about creating pages in GenGen, from basic setup to advanced configurations.
What are Pages?
Pages in GenGen are static content files that form the structure of your website. Unlike posts, which are typically blog entries organized by date (from front matter or a YYYY-MM-DD- filename prefix), pages are standalone content like "About", "Contact", or "Services" pages.
Basic Page Structure
Every page in GenGen consists of two main parts:
- Front Matter - YAML configuration at the top of the file
- Content - The actual page content (Markdown, HTML, or Liquid)
Example Basic Page
---
layout: page
---
# About Our Company
This is the content of the about page written in Markdown.
Note: The title is automatically inferred from the filename. For a file named about.md, the title would be "About".
Front Matter Configuration
Front matter is YAML configuration enclosed between triple dashes (---) at the beginning of your file. Here are the key properties you can configure:
Required Properties
GenGen can work with minimal or even no front matter configuration. All properties are optional since GenGen provides sensible defaults.
Optional Properties
title: The page title (used intags and navigation). If not provided, GenGen automatically infers the title from the filenamelayout: Specifies which layout template to use (defaults to site configuration)permalink: Custom URL structure for the pagedescription: Page description for SEO and meta tagsdate: Publication date (useful for organizing pages)published: Set tofalseto exclude from site generationtags: Array of tags for categorizationcategories: Array of categories for organization
Example with All Properties
---
title: Contact Us
layout: page
permalink: /contact/
description: Get in touch with our team
date: 2024-01-15
published: true
tags: [contact, support]
categories: [business]
---
Page Types and Examples
1. Homepage (index.html/index.md)
The homepage is typically named index.html or index.md and placed in your site root:
---
layout: home
title: Welcome to My Site
---
# Welcome!
This is the homepage of my website.
2. About Page
---
title: About
layout: page
permalink: /about/
---
# About Us
Learn more about our company and mission.
Result: Creates public/about/index.html
3. Contact Page
---
title: Contact
layout: page
permalink: /contact/
---
# Get in Touch
- Email: hello@example.com
- Phone: (555) 123-4567
Result: Creates public/contact/index.html
4. Custom 404 Page
---
permalink: /404.html
layout: default
title: Page Not Found
---
Permalink Configuration
Permalinks determine the URL structure of your pages. GenGen supports several permalink patterns.
Directory Structure
GenGen creates directory structures when permalinks end with / or have no file extension:
---
title: About Us
permalink: /about/
---
This creates:
- Directory:
public/about/ - File:
public/about/index.html
Built-in Permalink Structures
none: Uses the file path as-isdate: For posts, uses/year/month/day/title.htmlpretty: Removes file extensions for clean URLs
Custom Permalinks
You can define custom permalink patterns using tokens:
---
title: My Page
permalink: /custom/:title/
---
Available tokens:
:title- Slugified page title:path- Relative path from site root:basename- Filename without extension:output_ext- Output file extension (usually.html):categories- Page categories joined with/:year,:month,:day- Date components (for dated content)
Literal Permalinks
For exact URL control, use literal permalinks:
---
title: Special Page
permalink: /exactly/this/path/
---
Permalink Behavior:
/path/โ Createspath/index.html/pathโ Createspath/index.html/path.htmlโ Createspath.html
For comprehensive permalink documentation, see the Permalinks Guide.
Aliases
Create multiple URLs that point to the same page content:
---
title: About Us
permalink: /about/
aliases:
- /company-info.html
- /who-we-are.html
- /team.html
---
This creates:
- Main page:
public/about/index.html - Alias files:
public/company-info.html,public/who-we-are.html,public/team.html
All URLs serve identical content, perfect for:
- SEO preservation during site restructuring
- Backward compatibility when changing URLs
- Multiple access paths for the same content
See the Aliases Documentation for detailed examples and use cases.
Layouts
Layouts define the HTML structure that wraps your page content. GenGen looks for layouts in:
_layouts/directory- Theme layouts (
_themes/[theme]/_layouts/)
Specifying a Layout
---
layout: page
---
Common Layout Types
default: Basic page layout with header/footerpage: Standard page layoutpost: Blog post layout (typically for posts)home: Homepage layout
Layout Inheritance
Layouts can inherit from other layouts:
---
layout: default
---
Content Formats
GenGen supports multiple content formats:
Markdown (.md, .markdown)
---
title: Markdown Page
---
# Heading
This is **bold** and *italic* text.
- List item 1
- List item 2
HTML (.html)
---
title: HTML Page
---
HTML Content
Direct HTML content.
Liquid Templates
You can use Liquid templating in your content:
---
title: Dynamic Page
---
# Welcome, GenGen Documentation!
Recent posts:
File Organization
Recommended Directory Structure
your-site/
โโโ _layouts/ # Layout templates
โโโ _includes/ # Reusable partials
โโโ _themes/ # Theme files
โโโ assets/ # CSS, JS, images
โโโ about.md # About page
โโโ contact.md # Contact page
โโโ index.md # Homepage
โโโ config.yaml # Site configuration
Page Placement
- Root level: For main site pages (about.md, contact.md)
- Subdirectories: For organized content (services/web-design.md)
- Special directories: Avoid
_posts/for regular pages (reserved for blog posts). Posts can live in subdirectories under_posts/and do not require a date in the filename.
Theme Pages
Themes can ship pages via a content/ directory. Any theme content file with
YAML front matter is treated as a page and rendered into the final site output
using its relative path inside the theme content/ folder. If the site provides
a file at the same relative path, the site file overrides the theme page.
Generated Output Structure
Your pages create organized directory structures:
public/
โโโ about/
โ โโโ index.html
โโโ contact/
โ โโโ index.html
โโโ services/
โ โโโ web-design/
โ โโโ index.html
โโโ index.html
Advanced Features
Page Variables in Liquid
Access page properties in your content:
Creating Pages
Published: January 07, 2026
Tags:
Note: page.title will use the title from front matter if specified, otherwise it will use the title inferred from the filename.
Site Variables
Access site-wide data:
Site: GenGen Documentation
Total pages: 23
Conditional Content
Best Practices
1. Consistent Front Matter
Use consistent front matter across your pages:
---
title: Page Title
layout: page
description: Page description
date: 2024-01-15
---
2. SEO-Friendly Permalinks
Use descriptive, clean URLs:
# Good
permalink: /about-us/
# Avoid
permalink: /page1.html
3. Logical File Organization
Organize pages in a logical directory structure:
โโโ about/
โ โโโ index.md # /about/
โ โโโ team.md # /about/team/
โ โโโ history.md # /about/history/
โโโ services/
โ โโโ index.md # /services/
โ โโโ consulting.md # /services/consulting/
โโโ contact.md # /contact/
4. Layout Hierarchy
Create a clear layout hierarchy:
_layouts/
โโโ default.html # Base layout
โโโ page.html # Inherits from default
โโโ special.html # For special pages
Troubleshooting
Common Issues
- Page not generating: Check front matter syntax and file placement
- Layout not found: Verify layout exists in
_layouts/or theme - Permalink conflicts: Ensure unique permalinks across all pages
- Missing content: Check for proper front matter delimiters (
---)
Debugging Tips
- Check the generated
public/directory for output files - Verify front matter YAML syntax
- Ensure layout files exist and are properly structured
- Check GenGen build logs for error messages
Examples
For more examples, check the examples/ directory in the GenGen repository, which contains various site configurations and page types demonstrating different features and use cases.