-
Notifications
You must be signed in to change notification settings - Fork 3
Creating and Editing Pages
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.
These sections cover the normal page format and the information every public page needs.
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.
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.
Always declare the intended URL:
permalink: /exampleFor 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>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.
Keep pages/404.html at permalink: /404.html and preserve sitemap: false.
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.
When adding a completely new public address:
- Add the source page with a permalink, title, description, and other required settings.
- Add navigation only where it helps users; do not duplicate data-driven lists.
- Add the route to
PUBLIC_ROUTESintools/verify-site.rb. - Confirm
/sitemapincludes the page andsitemap.xmlcontains it. - 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