Skip to content

Creating and Editing Pages

Isaac edited this page Jul 23, 2026 · 3 revisions

Most public pages belong in pages/. The homepage (index.html) and news posts (_articles/) are the main exceptions.

Before starting, choose the public address for the page. In Jekyll this address is called a permalink. For example, permalink: /example creates https://www.pwindows.qzz.io/example.

Build a standard page

These sections cover the normal page format and the information every public page needs.

Standard content page

Create an .html or .md file inside pages/ and begin with this example:

---
layout: page
title: Example Page
permalink: /example
description: A useful, unique summary of the example page.
intro: Optional introductory text shown below the heading.
---

<div class="content-card">
  <h2>Section heading</h2>
  <p>Page content goes here.</p>
</div>

The block between the --- lines is called front matter. It contains page settings and is not displayed as page text.

The page layout automatically creates the main <h1> heading from title. Do not add another <h1> in the content. Start content sections with <h2> instead.

Required page qualities

The automated checks require every public page to have:

  • a non-empty <main> element;
  • exactly one <h1> inside <main>;
  • a non-empty document title;
  • a canonical URL, which tells search engines the page's official address;
  • a useful, unique meta description.

Use a short, descriptive title. The description is mainly for search results and link previews; it normally does not appear in the page itself. Use intro when you want a visible sentence below the heading.

URLs and links

Always declare the intended URL:

permalink: /example

For links to another PWindows page or image, copy this pattern. The relative_url part helps the link work both locally and on GitHub Pages:

<a href="{{ '/games' | relative_url }}">Games</a>
<img src="{{ '/assets/img/example.png' | relative_url }}" alt="Example">

Always use the unprefixed route in the source. Polyglot keeps English at /games and automatically changes the link to /zh-cn/games in the Chinese build. Never hard-code /en-us/ into a link. See Localization before adding visitor-facing text or language-specific behavior.

For shared links stored in _data/site.yml, copy this pattern. The escape part safely prepares the value for HTML:

<a href="{{ site.data.site.links.support | escape }}">Support</a>

Work with special pages

Special page types

Department page

Each department in _data/departments.yml must have one matching detail page:

---
layout: department
title: Example Department
permalink: /departments/example
description: Learn about the example department at PWindows.
intro: Learn what the example team contributes to PWindows.
department: example
---

The department value must be a key in _data/departments.yml, and the permalink must equal that record's path.

404 page

Keep pages/404.html at permalink: /404.html and preserve sitemap: false.

Homepage

The homepage lives in index.html and uses a custom composition inside the shared default layout. Preserve its single accessible heading when changing the animated hero.

Change public addresses

Adding a new route

When adding a completely new public address:

  1. Add the source page with a permalink, title, description, and other required settings.
  2. Add navigation only where it helps users; do not duplicate data-driven lists.
  3. Add the route to PUBLIC_ROUTES in tools/verify-site.rb.
  4. Confirm /sitemap includes the page and sitemap.xml contains it.
  5. Run the full checks in Testing and Deployment.

Ask a maintainer before removing or changing an existing public address because old bookmarks and links may stop working.

Next: Managing Site Data

Clone this wiki locally