# Paige
Powerful, pliable pixel perfection. An advanced Hugo theme. [Try it out.](https://willfaught.com/paige)
Paige is designed to put your content front and center,
avoiding the typical clutter.
The look is seamless and smooth, scalable and readable, portable and efficient.
The layout is minimal and responsive,
using verticality and white space to focus and delineate parts of the page.
The implementation is flexible and extensible.
It's a versatile canvas that serves most web needs.
## Features
- Accessibility
- Analytics
- Automatic switching between light and dark color schemes
- Blog
- Bootstrap
- Comments
- Customizable
- Dark color scheme
- E-mail protection
- Facebook sharing
- Header links
- Landing page
- Light color scheme
- Math typesetting
- Menu
- Minimal design
- Multiple authors
- Multiple languages
- RSS with full content
- Responsive
- Right-to-left languages
- SEO
- Safari and Firefox Reader View support
- Search
- Sections
- Single column
- Social links
- Table of contents
- Twitter sharing
- Validated with [PageSpeed](https://pagespeed.web.dev/report?url=https%3A%2F%2Fwillfaught.com%2Fpaige%2F&form_factor=desktop) and [Validator](https://validator.w3.org/nu/?doc=https%3A%2F%2Fwillfaught.com%2Fpaige%2F)
## Community
Get started by [starring](https://github.com/willfaught/paige/stargazers)
and [watching](https://github.com/willfaught/paige/watchers) the project.
If you find a problem or have a suggestion,
please share it by [creating an issue](https://github.com/willfaught/paige/issues/new).
If you have a fix or improvement,
please share it by [creating a pull request](https://github.com/willfaught/paige/compare).
If you make a customization or alteration,
please share it by [posting code or screenshots](https://github.com/willfaught/paige/discussions/8).
## Get started with Hugo
1. [Install Hugo](https://gohugo.io/installation/) (the extended version is required).
For Homebrew on Mac:
```sh
$ brew install hugo
```
For Chocolatey on Windows:
```sh
$ choco install hugo-extended
```
For Snap on Linux:
```sh
$ sudo snap install hugo
```
2. [Install Node](https://nodejs.org/en/download/).
For Homebrew on Mac:
```sh
$ brew install node
```
For Chocolatey on Windows:
```sh
$ choco install nodejs
```
For Snap on Linux:
```sh
$ sudo snap install node
```
3. [Install Embedded Dart Sass](https://github.com/sass/dart-sass-embedded/releases).
For Homebrew on Mac:
```sh
$ brew install sass/sass/dart-sass-embedded
```
For Chocolatey on Windows:
```sh
$ choco install dart-sass-embedded
```
For Snap on Linux:
```sh
$ sudo snap install dart-sass-embedded
```
4. Create a site:
```sh
$ hugo new site yourproject
```
5. Create a post:
```sh
$ cd yourproject
$ hugo new my-post.md
```
See [Hugo's quick start guide](https://gohugo.io/getting-started/quick-start/) for more information.
## Install
### Option 1: Use a Hugo module
Example `config.yaml`:
```yaml
module:
imports:
- path: "github.com/willfaught/paige"
```
Install:
```sh
$ cd yourproject
$ hugo mod init github.com/youraccount/yourproject
$ hugo mod get github.com/willfaught/paige
```
Update:
```sh
$ cd yourproject
$ hugo mod get -u
```
### Option 2: Use a Git subtree
Example `config.yaml`:
```yaml
theme: "paige"
```
Install:
```sh
$ cd yourproject
$ git subtree add --prefix themes/paige --squash https://github.com/willfaught/paige master
```
Update:
```sh
$ cd yourproject
$ git subtree pull --prefix themes/paige --squash https://github.com/willfaught/paige master
```
### Option 3: Use a Git submodule
Example `config.yaml`:
```yaml
theme: "paige"
```
Install:
```sh
$ cd yourproject
$ git submodule add https://github.com/willfaught/paige themes/paige
$ git submodule update --init --recursive --remote
```
Update:
```sh
$ cd yourproject
$ git submodule update --recursive --remote
```
### Option 4: Use a copy
Example `config.yaml`:
```yaml
theme: "paige"
```
Install:
```sh
$ cd yourproject
$ git clone https://github.com/willfaught/paige themes/paige
$ rm -rf themes/paige/.git
```
Update:
```sh
$ cd yourproject
$ rm -rf themes/paige
$ git clone https://github.com/willfaught/paige themes/paige
$ rm -rf themes/paige/.git
```
## Run
```sh
$ cd yourproject
$ hugo mod npm pack
$ npm install
$ hugo server -D
```
## Configure
### Parameters
There is a single parameter object with sensible defaults that can be overridden in site or page parameters:
```yaml
paige:
analytics:
chartbeat: # See https://chartbeat.com
account_id: ""
domain: ""
disabled: false # Disable all analytics
clicky: # See https://clicky.com
account_id: ""
fathom: # See https://usefathom.com
account_id: ""
finteza: # See https://finteza.com
account_id: ""
script_url: ""
hotjar: # See https://hotjar.com
account_id: ""
matomo: # See https://matomo.org
account_id: ""
host_url: ""
mixpanel: # See https://mixpanel.com
token: ""
plausible: # See https://plausible.io
account_id: ""
woopra: # See https://woopra.com
domain: ""
yandex: # See https://metrica.yandex.com
account_id: ""
color: "#0d6efd" # Bootstrap primary color; theme color for Safari and Windows
comments:
cactus: # See https://cactus.chat
account_id: ""
commento: # See https://commento.io
script_url: ""
disabled: false # Disable all comments
hyvor: # See https://hyvor.com
account_id: ""
intensedebate: # See https://intensedebate.com
account_id: ""
isso: # See https://isso-comments.de
script_url: ""
remark42: # See https://remark42.com
host_url: ""
site_id: ""
replybox: # See https://getreplybox.com
account_id: ""
utterances: # See https://utteranc.es
github_repo: ""
date:
format: ":date_long" # Hugo date format
source: "published" # Displayed date in single pages; must be "published" or "modified"
git:
commit_url_prefix: "" # Example is "https://github.com/willfaught/paige/commit/"
math: false # Enable math typesetting
max_width: "" # CSS unit; maximum width for the whole page
menu:
breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items
style: "pills" # Must be "links" or "pills"
rss:
hide_page: false
managing_editor: ""
web_master: ""
search:
hide_page: false
section_pages:
full_pages: false # Display full pages in the list of pages
style: "" # CSS included at the end of the stylesheet, before style-last.css
```
The assigned values shown are the default values.
### Site parameters
Optional site parameters:
```yaml
authors:
will-faught:
name: "Will Faught"
default: false # Credit this author in pages that have no authors parameter
```
### Page parameters
Optional page parameters:
```yaml
authors:
- "will-faught" # Credit the corresponding author in the site parameters
- author: "will-faught" # Credit the corresponding author in the site parameters
- name: "Will Faught" # Credit this author
link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title
paige:
alert: "Alert!" # Markdown displayed before the page body (defaults to primary alert type)
paige:
alert:
message: "Alert!" # Markdown displayed before the page body
type: "primary" # Bootstrap alert type
```
## Layouts
### Home
The `paige/home` layout provides a home page.
Example `content/_index.md`:
```yaml
layout: "paige/home"
paige:
home:
blurb: "" # Displayed below the greeting
greeting: "" # Displayed below the image
image:
alt: "" # Image alt
height: "" # CSS unit; image height
stretch: false # Stretch the image fully horizontally if true; center the image otherwise
url: "" # Local or remote resource glob
width: "" # CSS unit; image width
social:
examplesite:
bootstrap_icon: "" # Example is "example-icon"
name: "" # Example is "Example"
url: "" # Example is "https://example.com/username"
```
The assigned values shown are the default values.
### Search
The `paige/search` layout provides a search page.
Example `config.yaml`:
```yaml
outputs:
home: ["html", "json", "rss"]
```
Example `content/search.md`:
```yaml
layout: "paige/search"
title: "Search"
```
### Section
The `paige/section` layout provides a section page.
Example `content/_index.md`:
```yaml
layout: "paige/section"
```
## Shortcodes
### Figure
The `paige/figure` shortcode provides a figure with content.
```
{{< paige/figure
caption="My caption"
float="left"
height="10rem"
horizontal="center"
maxwidth="10rem"
number=0
numbered=false
vertical="center"
width="10rem"
>}}
My content
{{< /paige/figure >}}
```
Inner content: Required. String. Markdown. The content.
Parameters:
caption
float
start
or end
.height
horizontal
start
, center
, or end
. Default is center
.maxwidth
number
numbered
vertical
start
, center
, or end
. Default is center
.width
Test
{{< /paige/code >}} ``` Inner content: Required. String. The code. Parameters:lang
plaintext
. See the codes.options
alt
height
link
maxheight
maxwidth
method
crop
, fill
, fit
, or resize
. Must be specified with options
. See the methods.options
method
. See the options.src
title
width
align
baseline
, center
, end
, start
, or stretch
. Must not be used when nested.height
images
justify
around
, between
, center
, end
, evenly
, or start
. Must not be used when nested.maxheight
maxwidth
method
crop
, fill
, fit
, or resize
. Default is resize
. See the methods.options
550x webp picture Lanczos
. See the options.type
grid
or list
. Default is list
.width
autopause
true
.autoplay
false
.background
false
.byline
color
00adef
.controls
true
.description
Vimeo video
.dnt
false
.fullscreen
true
.height
keyboard
true
.loop
false
.maxheight
maxwidth
muted
false
.pip
false
.playsinline
true
.portrait
quality
auto
, 240p
, 360p
, 540p
, 720p
, 1080p
, 2k
, or 4k
. Default is auto
.speed
false
.texttrack
en
, en-US
). Use the corresponding subtitles. Default is false
.time
0m
, 1m2s
). Start time. Default is 0m
.title
transparent
true
.video
width
autoplay
controls
true
.description
YouTube video
.end
fullscreen
true
.height
list
loop
maxheight
maxwidth
mute
start
video
width
.paige-article
.paige-authors
.paige-content
.paige-date
.paige-date-header
.paige-description
.paige-draft
.paige-expired
.paige-future
.paige-home
.paige-article
for a page with kind "home"..paige-metadata
.paige-modified
.paige-page
.paige-published
.paige-quote
.paige-section
.paige-article
for a page with kind "section"..paige-single
.paige-article
for a page with kind "page"..paige-summary
.paige-reading-time
.paige-taxonomy
.paige-article
for a page with kind "taxonomy"..paige-term
.paige-article
for a page with kind "term"..paige-term
.paige-terms
.paige-title
.paige-toc
.paige-unpublished
#paige-comments
#paige-copyright
#paige-credit
#paige-footer
#paige-header
#paige-main
#paige-pages
#paige-pagination
#paige-root