Powerful, pliable pixel perfection. An advanced Hugo theme. Try it out.
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.
- 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
-
For Homebrew on Mac:
$ brew install hugo
-
Create a site:
$ hugo new site yourproject
-
Create a post:
$ cd yourproject $ hugo new my-post.md
See Hugo's quick start guide for more information.
Example config.yaml
:
module:
imports:
- path: "github.com/willfaught/paige"
Install:
$ cd yourproject
$ hugo mod init github.com/youraccount/yourproject
$ hugo mod get github.com/willfaught/paige
Update:
$ cd yourproject
$ hugo mod get -u
Example config.yaml
:
theme: "paige"
Install:
$ cd yourproject
$ git subtree add --prefix themes/paige --squash https://github.com/willfaught/paige master
Update:
$ cd yourproject
$ git subtree pull --prefix themes/paige --squash https://github.com/willfaught/paige master
Example config.yaml
:
theme: "paige"
Install:
$ cd yourproject
$ git submodule add https://github.com/willfaught/paige themes/paige
$ git submodule update --init --recursive --remote
Update:
$ cd yourproject
$ git submodule update --recursive --remote
Example config.yaml
:
theme: "paige"
Install:
$ cd yourproject
$ git clone https://github.com/willfaught/paige themes/paige
$ rm -rf themes/paige/.git
Update:
$ cd yourproject
$ rm -rf themes/paige
$ git clone https://github.com/willfaught/paige themes/paige
$ rm -rf themes/paige/.git
$ cd yourproject
$ hugo server -D
There is a single parameter object with sensible defaults that can be overridden in site or page parameters:
paige:
analytics:
chartbeat: # See https://chartbeat.com
account_id: "" # Example is "123456"
domain: "" # Example is "example.com"
clicky: # See https://clicky.com
account_id: "" # Example is "123456"
fathom: # See https://usefathom.com
account_id: "" # Example is "123456"
finteza: # See https://finteza.com
account_id: "" # Example is "123456"
script_url: "" # Example is "https://example.com/script.js"
hotjar: # See https://hotjar.com
account_id: "" # Example is "123456"
matomo: # See https://matomo.org
account_id: "" # Example is "123456"
host_url: "" # Example is "https://example.com"
mixpanel: # See https://mixpanel.com
token: "" # Example is "123456"
plausible: # plausible.io
account_id: "" # Example is "123456"
woopra: # See https://woopra.com
domain: "" # Example is "example.com"
yandex: # See https://metrica.yandex.com
account_id: "" # Example is "123456"
bootstrap: # See https://getbootstrap.com
icons:
link_href: "https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" # Local or remote resource glob
link_integrity: "sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" # Subresource integrity hash
script:
raw: false # Do not copy or process the resource
script_integrity: "sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" # Subresource integrity hash
script_src: "https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" # Local or remote resource glob
style:
link_href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" # Local or remote resource glob
link_integrity: "sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" # Subresource integrity hash
raw: false # Do not copy or process the resource
color: "#0d6efd" # Theme color for Safari and Windows
color_scheme: "" # Always use this color scheme without automatic switching; must be "", "light", or "dark"
comments:
cactus: # See https://cactus.chat
account_id: "" # Example is "123456"
commento: # See https://commento.io
script_url: "" # Example is "https://example.com/script.js"
hyvor: # See https://hyvor.com
account_id: "" # Example is "123456"
intensedebate: # intensedebate.com
account_id: "" # Example is "123456"
isso: # See https://isso-comments.de
script_url: "" # Example is "https://example.com/script.js"
remark42: # See https://remark42.com
host_url: "" # Example is "https://example.com"
site_id: "" # Example is "123456"
replybox: # See https://getreplybox.com
account_id: "" # Example is "123456"
utterances: # See https://utteranc.es
github_repo: "" # Example is "example/foo"
credit:
data:
hide: false # Don't credit this project in a data attribute
link:
hide: false # Don't credit this project in the footer
header:
menu:
breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items
style: "pills" # Must be "links" or "pills"
home:
blurb: "" # Displayed below the greeting
greeting: "" # Displayed below the image
image:
raw: false # Do not copy or process the file
stretch: false # Stretch the image fully horizontally if true; center the image otherwise
url: "" # Local or remote resource glob
katex:
autorender:
raw: false # Do not copy or process the file
script_integrity: "sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" # Subresource integrity hash
script_src: "https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" # Local or remote resource glob
script:
raw: false # Do not copy or process the file
script_integrity: "sha384-97gW6UIJxnlKemYavrqDHSX3SiygeOwIZhwyOKRfSaf0JWKRVj9hLASHgFTzT+0O" # Subresource integrity hash
script_src: "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" # Local or remote resource glob
style:
link_href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" # Local or remote resource glob
link_integrity: "sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" # Subresource integrity hash
list:
authors:
class: "mb-0 text-center text-secondary"
hide: false
content:
show: false
date:
class: "mb-0 text-center text-secondary"
format: ":date_long" # Hugo date format
hide: false
date_header:
class: "h5 text-center"
hide: false
description:
class: "mb-0 text-center"
hide: false
pages:
hide: false
reading_time:
class: "mb-0 text-center text-secondary"
hide: false
section:
class: "mb-3 w-100"
summary:
class: "fst-italic mb-0 text-center"
hide: false
terms:
hide: false
inner_class: "badge text-bg-secondary text-decoration-none"
outer_class: "mb-0 text-center"
title:
class: "mb-0 text-center"
hide: false
main:
metadata:
authors:
class: "text-center text-secondary"
hide: false
date:
class: "text-center text-secondary"
format: ":date_long" # Hugo date format
hide: false
lastmod:
hide: false
description:
class: "lead text-center"
hide: false
git:
commit_url_prefix: "" # Example is "https://github.com/willfaught/paige/commit/"
max_width: ""
reading_time:
class: "text-center text-secondary"
hide: false
section:
class: "paige-metadata w-100"
terms:
hide: false
inner_class: "badge text-bg-secondary text-decoration-none"
outer_class: "text-center"
title:
class: "display-5 fw-bold text-center"
hide: false
table_of_contents:
class: "border mb-3 pe-3 ps-3 pt-3 rounded"
hide: false
max_width: ""
content:
class: "mw-100 paige-content"
hide: false
max_width: ""
math: false # Math typesetting
rss:
hide_page: false
managing_editor: ""
web_master: ""
search:
hide_page: false
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.
If you set paige.credit.data.hide
or paige.credit.link.hide
, please credit this project in a post to help others find it.
Optional site parameters:
authors:
michael_bluth:
name: ""
default: false # Credit this author in pages that have no authors parameter
Optional page parameters:
authors:
- "michael_bluth" # Credit the corresponding author in the site parameters
- author: "michael_bluth" # Credit the corresponding author in the site parameters
- name: "Lucille Bluth" # Credit this author
link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title
The paige/search
layout provides full site search.
Example config.yaml
:
outputs:
home: ["html", "json", "rss"]
Example content/search.md
:
---
layout: paige/search
title: Search
---
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
- Optional. Position 0. String. Markdown. Descriptive text below the content.
float
- Optional. String. Float to one side of its container. Must be
start
orend
. height
- Optional. String. CSS value. Total height.
horizontal
- Optional. String. Horizontal alignment. Must be
start
,center
, orend
. Default iscenter
. maxheight
- Optional. String. CSS value. Maximum total height.
maxwidth
- Optional. String. CSS value. Maximum total width.
number
- Optional. Integer or string. Figure number. Displayed with the caption.
numbered
- Optional. Boolean. Number the figure automatically. Displayed with the caption.
vertical
- Optional. String. Vertical alignment. Must be
start
,center
, orend
. Default iscenter
. width
- Optional. String. CSS value. Total width.
The paige/quote
shortcode provides a figure with a quotation.
{{< paige/quote >}}
My content
{{< /paige/quote >}}
Inner content: Required. String. Markdown. The quotation.
Parameters:
It has the parameters of the paige/figure
shortcode.
The paige/code
shortcode provides a figure with code.
{{< paige/code
caption="My caption"
lang="html"
options="linenos=true"
>}}
<!doctype html>
<html lang="en">
<body>
<p>Test</p>
</body>
</html>
{{< /paige/code >}}
Inner content: Required. String. The code.
Parameters:
caption
- Optional. String. Markdown. Descriptive text below the code.
lang
- Optional. Position 0. String. Chroma language code. Defaults to
plaintext
. See the codes. options
- Optional. String. Hugo highlight options. See the options.
It has the other parameters of the paige/figure
shortcode.
The paige/image
shortcode provides a figure with an image.
{{< paige/image
alt="My alt" >}}
caption="My caption"
link="https://github.com/willfaught/paige"
method="resize"
options="550x webp picture Lanczos"
raw=false
src="me.jpg"
title="My title"
>}}
Inner content: None.
Parameters:
alt
- Optional. String. Plain text. Image alt.
caption
- Optional. String. Markdown. Descriptive text below the image.
link
- Optional. String. URL. Image link.
method
- Optional. String. Hugo image processing method. Must be
crop
,fill
,fit
, orresize
. Must be specified withoptions
. See the methods. options
- Optional. String. Hugo image processing options. Must be specified with
method
. See the options. raw
- Optional. Boolean. Whether to reference an image without copying it. Default is
false
. src
- Required. Position 0. String. URL. Image source.
title
- Optional. String. Plain text. Image title.
It has the other parameters of the paige/figure
shortcode.
The paige/gallery
shortcode provides a figure with a collection of images.
{{< paige/gallery
align="center"
caption="My caption"
height="10rem"
images="*.jpg"
justify="center"
maxheight="10rem"
maxwidth="10rem"
method="resize"
options="550x webp picture Lanczos"
type="list"
width="10rem"
/>}}
{{< paige/gallery >}}
{{< paige/gallery
caption="My caption"
height="10rem"
image="me.jpg"
maxheight="10rem"
maxwidth="10rem"
method="resize"
options="550x webp picture Lanczos"
raw=false
width="10rem"
/>}}
{{< paige/gallery
caption="My caption"
height="10rem"
image="you.jpg"
maxheight="10rem"
maxwidth="10rem"
method="resize"
options="550x webp picture Lanczos"
raw=false
width="10rem"
/>}}
{{< /paige/gallery >}}
Inner content: Optional. String. HTML. Must be other uses of this shortcode.
Parameters:
align
- Optional. String. Cross axis alignment. Must be
baseline
,center
,end
,start
, orstretch
. Must not be used when nested. caption
- Optional. String. Markdown. Descriptive text below the image or images.
height
- Optional. String. CSS value. Image height.
image
- Optional. String. Page, site, or remote image glob. Only used in the inner content of this shortcode.
images
- Optional. Position 0. String. Page, site, or remote images glob. Default is all image page resources.
justify
- Optional. String. Main axis space distribution. Must be
around
,between
,center
,end
,evenly
, orstart
. Must not be used when nested. maxheight
- Optional. String. CSS value. Maximum image height.
maxwidth
- Optional. String. CSS value. Maximum image width.
method
- Optional. String. Hugo image processing method. Must be
crop
,fill
,fit
, orresize
. Default isresize
. See the methods. options
- Optional. String. Hugo image processing options. Default is
550x webp picture Lanczos
. See the options. raw
- Optional. Boolean. Whether to reference an image without copying it. Default is
false
. type
- Optional. String. Type of layout. Grid and list layouts use the horizontal axis as the main axis, and the vertical axis as the cross axis. Must be
grid
orlist
. Default islist
. width
- Optional. String. CSS value. Image width.
It has the other parameters of the paige/figure
shortcode.
The paige/vimeo
shortcode provides a responsive Vimeo video.
{{< paige/vimeo
autopause=true
autoplay=false
background=false
byline=true
color="00adef"
controls=true
description="My description"
dnt=false
fullscreen=true
keyboard=true
loop=false
muted=false
pip=false
playsinline=true
portrait=true
quality="auto"
speed=false
texttrack=false
time="1m2s"
title=true
transparent=true
video="644036051"
>}}
Inner content: None.
Parameters:
autopause
- Optional. Boolean. Enable playing more than one Vimeo video on the same page. Default is
true
. autoplay
- Optional. Boolean. Autoplay the video. Default is
false
. background
- Optional. Boolean. Autoplay the video. Hide the controls. Loop the video. Mute the video. Default is
false
. byline
- Optional. Boolean. Show the author. Default is configured per video.
color
- Optional. String. Hex code. Control color. Default is
00adef
. controls
- Optional. Boolean. Show the controls. Default is
true
. description
- Optional. String. Plain text. Screen reader content. Default is
Vimeo video
. dnt
- Optional. Boolean. Do not track session data. Default is
false
. fullscreen
- Optional. Boolean. Enable full screen. Default is
true
. keyboard
- Optional. Boolean. Enable keyboard input. Default is
true
. loop
- Optional. Boolean. Loop the video. Default is
false
. muted
- Optional. Boolean. Mute the video. Default is
false
. pip
- Optional. Boolean. Show the picture-in-picture control. Default is
false
. playsinline
- Optional. Boolean. Play inline instead of full screen on mobile devices. Default is
true
. portrait
- Optional. Boolean. Show the author's profile image. Default is configured per video.
quality
- Optional. String. The resolution. Must be
auto
,240p
,360p
,540p
,720p
,1080p
,2k
, or4k
. Default isauto
. speed
- Optional. Boolean. Show the speed controls. Default is
false
. texttrack
- Optional. String. Language code and optionally a locale code (e.g.
en
,en-US
). Use the corresponding subtitles. Default isfalse
. time
- Optional. String. Duration (e.g.
0m
,1m2s
). Start time. Default is0m
. title
- Optional. Boolean. Show the title. Default is configured per video.
transparent
- Optional. Boolean. Use a transparent background instead of a black one. Default is
true
. video
- Optional. Position 0. String. Video ID.
It has the parameters of the paige/figure
shortcode.
See Vimeo documentation for more detail.
The paige/youtube
shortcode provides a responsive YouTube video.
{{< paige/youtube
autoplay=false
controls=true
end=20
fullscreen=true
list=PL2WkvfelorAFjpzGUWc4OWAWmiJpwL97L
loop=true
mute=true
start=10
title="My title"
video="dQw4w9WgXcQ"
>}}
Inner content: None.
Parameters:
autoplay
- Optional. Boolean. Automatically play the video.
controls
- Optional. Boolean. Show video controls. Default is
true
. description
- Optional. String. Plain text. Screen reader content. Default is
YouTube video
. end
- Optional. Integer. Elapsed seconds. Stop the video here.
fullscreen
- Optional. Boolean. Enable full screen. Default is
true
. list
- Optional. String. Playlist ID.
loop
- Optional. Boolean. Loop the video.
mute
- Optional. Boolean. Mute the video.
start
- Optional. Integer. Elapsed seconds. Start the video here.
video
- Optional. Position 0. String. Video ID.
It has the parameters of the paige/figure
shortcode.
If this file exists in the site | It is included at |
---|---|
partials/paige/body-first.html |
The beginning of the body tag |
partials/paige/body-last.html |
The end of the body tag |
partials/paige/footer-first.html |
The beginning of the footer tag |
partials/paige/footer-last.html |
The end of the footer tag |
partials/paige/head-first.html |
The beginning of the head tag |
partials/paige/head-last.html |
The end of the head tag |
partials/paige/header-first.html |
The beginning of the header tag |
partials/paige/header-last.html |
The end of the header tag |
partials/paige/main-first.html |
The beginning of the main tag |
partials/paige/main-last.html |
The end of the main tag |
Most code is in partials that are included by the layouts. Elements can be added, changed, or removed easily by overriding the corresponding layout or partial.
For example, the layouts
home.html
, list.html
, single.html
, taxonomy.html
, and term.html
include the partial paige/article.html
.
paige/article.html
includes the partials paige/metadata.html
, paige/toc.html
, and paige/content.html
.
To change the page title for those layouts, change paige/metadata.html
.
To change the page title for single.html
,
replace the use of paige/article.html
in single.html
with the use of
paige/metadata.html
, paige/toc.html
, and paige/content.html
,
then replace that use of paige/metadata.html
with your own design.
These optional CSS names can be defined how you want:
#paige-container
- The outermost element in the body.
#paige-copyright
- The copyright in the footer.
#paige-credit
- The credit in the footer.
#paige-footer
- The footer element in the container.
#paige-header
- The header element in the container.
#paige-main
- The main element in the container.
#paige-pages
- The pages in the list and term layouts.
#paige-pagination
- The pagination links in the list and term layouts.
.paige-article
- The page article.
.paige-authors
- The page authors.
.paige-content
- The page content.
.paige-date
- The page date.
.paige-date-header
- Date headers in list and term layouts.
.paige-description
- The page description.
.paige-draft
- Applied to the title of draft pages in the list and term layouts.
.paige-expired
- Applied to the title of expired pages in the list and term layouts.
.paige-future
- Applied to the title of future pages in the list and term layouts.
.paige-metadata
- The page metadata section.
.paige-modified
- Applied to the title of modified pages in the list and term layouts.
.paige-page
- A page in the pages in the list and term layouts.
.paige-published
- Applied to the title of published pages in the list and term layouts.
.paige-summary
- The page summary.
.paige-reading-time
- The page reading time.
.paige-terms-inner
- The page terms.
.paige-terms-outer
- The container of the page terms.
.paige-title
- The page title.
.paige-toc
- The page table of contents.
.paige-unpublished
- Applied to the title of unpublished (draft, expired, future) pages in the list and term layouts.
The HTML author is the page authors.
The HTML description is the page description.
The HTML keywords is a union of the page keywords, tags, and categories.
The HTML title is the page title, followed by a middle dot, followed by the site title. If one is missing, the other is used without the middle dot. For the home page, the title is the page title, or the site title otherwise.
The HTML body can have a header, a body, and a footer. The header has the menu, the page title, the page description, the page authors, and the page date. The body has the page content. The footer has the copyright notice and the theme link.
The page title and description can be Markdown. Markup is stripped for HTML and RSS titles.
The page title is displayed in an h1
tag, so page content headers must start with h2
.
The page date is the publish date.
Bootstrap 5.3.0-alpha1 CSS and JavaScript and Bootstrap Icons 1.10.3 are used unless overridden.
Hugo names, HTML names, CSS names, and JavaScript names that begin with "paige" capitalized in any way are reserved.
Get started by starring and following the project.
If you find a problem or have a suggestion, please share it by creating an issue. Feedback is encouraged and appreciated.
If you have a fix or improvement, please share it by creating a pull request.
If you have a customization or alteration you think others may like, please share it by posting code or screenshots to the discussion.
Photo by Sergey Pesterev.
Created by Will Faught. Released under the Apache License 2.0. Hosted at https://github.com/willfaught/paige.