# 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.
Welcome to the last Hugo theme you'll probably ever need.
## 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
## Get started with Hugo
1. [Install Hugo](https://gohugo.io/installation/).
For Homebrew on Mac:
```sh
$ brew install hugo
```
2. Create a site:
```sh
$ hugo new site yourproject
```
3. 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 server -D
```
## Configure
There is a single parameter object with sensible defaults that can be overridden in site or page parameters:
```yaml
authors:
michael_bluth:
name: "Michael Bluth"
default: true # Credit this author in pages that have no authors parameter
george_bluth:
name: "George Bluth"
paige:
analytics:
chartbeat: # chartbeat.com
account_id: "123456"
domain: "example.com"
clicky: # clicky.com
account_id: "123456"
fathom: # usefathom.com
account_id: "123456"
finteza: # finteza.com
account_id: "123456"
script_url: "https://example.com/script.js"
hotjar: # hotjar.com
account_id: "123456"
matomo: # matomo.org
account_id: "123456"
host_url: "https://example.com"
mixpanel: # mixpanel.com
token: "123456"
plausible: # plausible.io
account_id: "123456"
woopra: # woopra.com
domain: "example.com"
yandex: # metrica.yandex.com
account_id: "123456"
bootstrap:
icons:
link_href: "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" # Local or remote file
link_integrity: "sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" # File integrity hash
script:
raw: false # Do not copy or process the file; default is false
script_integrity: "sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" # File integrity hash
script_src: "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" # Local or remote file
style:
link_href: "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" # Local or remote file
link_integrity: "sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" # File integrity hash
raw: false # Do not copy or process the file; default is false
color: "#123456" # Theme color for Safari and Windows; default is "#0d6efd"
color_scheme: "light" # Use the "light" or "dark" color scheme without automatic switching; default is ""
content_max_width: "66ch" # Page table of contents and content max width; default is ""
comments:
cactus: # cactus.chat
account_id: "123456"
commento: # commento.io
script_url: "https://example.com/script.js"
hyvor: # hyvor.com
account_id: "123456"
intensedebate: # intensedebate.com
account_id: "123456"
isso: # isso-comments.de
script_url: "https://example.com/script.js"
remark42: # remark42.com
host_url: "https://example.com"
site_id: "123456"
replybox: # getreplybox.com
account_id: "123456"
utterances: # utteranc.es
github_repo: "example/foo"
home:
blurb: "There's a new daddy in town." # Displayed below the greeting; default is ""
greeting: "You know best" # Displayed below the image; default is ""
image:
raw: false # Do not copy or process the file; default is false
stretch: false # Stretch the image fully horizontally if true; center the image otherwise; default is false
url: "me.jpg" # A page, site, or remote resource glob; default is ""
hide_credit_data: false # Don't credit this project in a data attribute; default is false
hide_credit_link: false # Don't credit this project in the footer; default is false
katex:
autorender:
raw: false # Do not copy or process the file; default is false
script_integrity: "sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" # File integrity hash
script_src: "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js" # Local or remote file
script:
raw: false # Do not copy or process the file; default is false
script_integrity: "sha384-97gW6UIJxnlKemYavrqDHSX3SiygeOwIZhwyOKRfSaf0JWKRVj9hLASHgFTzT+0O" # File integrity hash
script_src: "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js" # Local or remote file
style:
link_href: "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" # Local or remote file
link_integrity: "sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" # File integrity hash
list:
authors:
class: "mb-0 text-center text-secondary" # Default is "mb-0 text-center text-secondary"
hide: false # Default is false
content:
show: false # Default is false
date:
class: "mb-0 text-center text-secondary" # Default is "mb-0 text-center text-secondary"
format: ":date_long" # Default is ":date_long"
hide: false # Default is false
date_header:
class: "h5 text-center" # Month and year header class attribute
hide: false # Default is false
description:
class: "mb-0 text-center" # Default is "mb-0 text-center"
hide: false # Default is false
reading_time:
class: "mb-0 text-center text-secondary" # Default is "mb-0 text-center text-secondary"
hide: false # Default is false
section:
class: "mb-3 w-100" # Default is "mb-3 w-100"
summary:
class: "fst-italic mb-0 text-center" # Default is "fst-italic mb-0 text-center"
hide: false # Default is false
terms:
hide: false # Default is false
inner_class: "badge text-bg-secondary text-decoration-none" # Default is "badge text-bg-secondary text-decoration-none"
outer_class: "mb-0 text-center" # Default is "mb-0 text-center"
title:
class: "mb-0 text-center" # Default is "mb-0 text-center"
hide: false # Default is false
math: false # Enable math typesetting; default is false
menu:
breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items; default is "sm"
style: "pills" # Menu item style; must be "links" or "pills"; default is "pills"
metadata_max_width: "100ch" # Page metadata max width; default is ""
page:
authors:
class: "text-center text-secondary" # Default is "text-center text-secondary"
hide: false # Default is false
content:
class: "mw-100 paige-content" # Default is "mw-100 paige-content"
hide: false # Default is false
date:
class: "text-center text-secondary" # Default is "text-center text-secondary"
format: ":date_long" # Default is ":date_long"
hide: false # Default is false
description:
class: "lead text-center" # Default is "lead text-center"
hide: false # Default is false
reading_time:
class: "text-center text-secondary" # Default is "text-center text-secondary"
hide: false # Default is false
rss:
hide: false # Don't include this page in RSS feeds; default is false
search:
hide: false # Don't include this page in search results; default is false
section:
class: "paige-metadata w-100" # Default is "paige-metadata w-100"
table_of_contents:
hide: false # Default is false
terms:
hide: false # Default is false
inner_class: "badge text-bg-secondary text-decoration-none" # Default is "badge text-bg-secondary text-decoration-none"
outer_class: "text-center" # Default is "text-center"
title:
class: "display-5 fw-bold text-center" # Default is "display-5 fw-bold text-center"
hide: false # Default is false
rss:
managing_editor: "Michael Bluth" # Default is ""
web_master: "Michael Bluth" # Default is ""
social:
examplesite:
bootstrap_icon: example-icon
name: Example
url: https://example.com/username
```
If you set `hide_credit_data` or `hide_credit_link`, please credit this project in a post to help others find it.
Optional page parameters:
```yaml
authors: [
"michael_bluth", # Credit the corresponding author name in the site parameters
{"author": "michael_bluth"}, # Credit the corresponding author name in the site parameters
{"name": "Lucille Bluth"} # Credit this author name
]
link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title
```
Example `config.yaml`:
```yaml
baseurl: https://example.com
copyright: © Michael Bluth
enablerobotstxt: true
languagecode: en-us
languages:
en:
menu:
main:
- identifier: home
name: Home
url: /
weight: 10
- identifier: about
name: About
url: /about/
weight: 20
- identifier: blog
name: Blog
url: /blog/
weight: 30
- identifier: categories
name: Categories
url: /categories/
weight: 40
- identifier: tags
name: Tags
url: /tags/
weight: 50
- identifier: search
name: Search
url: /search/
weight: 60
title: No Borders, No Limits
weight: 10
markup:
goldmark:
renderer:
unsafe: true
tableofcontents:
endlevel: 6
ordered: true
startlevel: 2
module:
imports:
- path: github.com/willfaught/paige
outputs:
home:
- html
- json
- rss
paginate: 50
params:
paige:
social:
email:
bootstrap_icon: envelope
link: mailto:username@example.com
name: E-mail
github:
bootstrap_icon: github
link: https://github.com/username
name: GitHub
linkedin:
bootstrap_icon: linkedin
link: https://linkedin.com/in/username
name: LinkedIn
permalinks:
blog: /blog/:year/:month/:day/:title/
social:
twitter: username
timezone: America/Los_Angeles
titlecasestyle: Go
```
## Layouts
The `paige/search` layout provides full site search.
Example `config.yaml`:
```yaml
outputs:
home: ["html", "json", "rss"]
```
Example `content/search.md`:
```yaml
---
layout: paige/search
title: Search
---
```
## Shortcodes
### Figure
The `paige/figure` shortcode provides a figure with content.
```
{{< paige/figure
caption="My caption"
float="left"
height="10rem"
horizontal="center"
maxheight="10rem"
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
.maxheight
maxwidth
number
numbered
vertical
start
, center
, or end
. Default is center
.width
Test
{{< /paige/code >}} ``` Inner content: Required. String. The code. Parameters:caption
lang
plaintext
. See the codes.options
alt
caption
link
method
crop
, fill
, fit
, or resize
. Must be specified with options
. See the methods.options
method
. See the options.raw
false
.src
title
align
baseline
, center
, end
, start
, or stretch
. Must not be used when nested.caption
height
image
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.raw
false
.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
.keyboard
true
.loop
false
.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
autoplay
controls
true
.description
YouTube video
.end
fullscreen
true
.list
loop
mute
start
video
.paige-draft
.paige-expired
.paige-future
.paige-modified
.paige-unpublished