Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/willfaught/paige

Powerful, pliable pixel perfection. An advanced Hugo theme.
https://github.com/willfaught/paige

blog blog-theme blogging blogs hugo hugo-blog hugo-blog-theme hugo-module hugo-site hugo-starter hugo-theme module theme

Last synced: 2 days ago
JSON representation

Powerful, pliable pixel perfection. An advanced Hugo theme.

Awesome Lists containing this project

README

        

# Paige

Powerful, pliable pixel perfection. An advanced Hugo theme. [Try it out.](https://willfaught.com/paige)



Screenshot

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 delineate and highlight each part of the page. The implementation is flexible and extensible. It’s a versatile canvas that serves most web needs.

## Features

- Accessibility
- Analytics
- Atom feed
- Authors
- Blog
- Bootstrap styles and icons
- Categories
- Code shortcode
- Comments
- Customizable
- Dark color scheme
- Email shortcode
- Facebook sharing
- Figure shortcode
- Gallery shortcode
- Header links
- Icon shortcode
- Image pixel densities
- Image shortcode
- Image size breakpoints
- Image thumbnails
- Landing page
- Languages
- Light color scheme
- Math typesetting
- Menu
- Minimal design
- Quote shortcode
- Responsive
- Right-to-left languages
- RSS feed
- Safari and Firefox Reader View support
- Search
- Sections
- SEO
- Series
- Single column
- Social links
- Table of contents
- Tab shortcode
- Tags
- 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)
- Vimeo shortcode
- YouTube shortcode

## 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).

If you deploy a site,
please share it by [posting a link](https://github.com/willfaught/paige/discussions/12).

## Setup

1. [Install Hugo](https://gohugo.io/installation/) (the extended version, and at least 0.123.0).

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 Dart Sass](https://github.com/sass/dart-sass/releases).

For Homebrew on Mac:

```sh
$ brew install sass/sass/sass
```

For Chocolatey on Windows:

```sh
$ choco install sass
```

For Snap on Linux:

```sh
$ sudo snap install dart-sass
```

3. Create a site:

```sh
$ hugo new site yoursite
```

4. Create a post:

```sh
$ cd yoursite
$ hugo new yourpost.md
```

5. Install the Paige module:

```sh
$ cd yoursite
$ hugo mod init github.com/youraccount/yoursite
$ hugo mod get github.com/willfaught/paige@latest
```

6. Import the Paige module:

```sh
$ cd yoursite
$ cat >>hugo.toml <}}

{{< /paige/code >}}
```

Parameters:


lang

Optional. Position 0. String. Chroma language code. Default is plaintext.

options

Optional. String. Hugo highlight options.

unescape

Optional. Boolean. Whether to reverse the HTML escaping in the body. Useful for when the request shortcode is used in the body.

Body: Required. String. The code.

### Email

The `paige/email` shortcode hides e-mail addresses from robots.

```
{{< paige/email
address="" >}}

{{< /paige/email >}}
```

Parameters:


address

Required. Position 0. String. The e-mail address.

Body: Required. String. Markdown. The content.

### Figure

The `paige/figure` shortcode provides a figure.

```
{{< paige/figure
caption=""
float=""
height=""
horizontal=""
maxwidth=""
number=0
numbered=false
vertical=""
width="" >}}

{{< /paige/figure >}}
```

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 or end.

height

Optional. String. CSS value. Total height.

horizontal

Optional. String. Horizontal alignment. Must be start, center, or end. Default is center.

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, or end. Default is center.

width

Optional. String. CSS value. Total width.

Body: Required. String. Markdown. The content.

### Gallery

The `paige/gallery` shortcode provides an arrangement of images.

```
{{< paige/gallery
align=""
breakpoints=false
class=""
densities=""
fetchpriority=""
height=""
images=""
justify=""
linked=""
loading=""
maxheight=""
maxwidth=""
process=""
style=""
type=""
width="" >}}

{{< /paige/gallery >}}
```

Parameters:


align

Optional. String. Cross axis alignment. Must be baseline, center, end, start, or stretch.

breakpoints

Optional. Boolean. Whether to generate copies of the image sized to each Bootstrap breakpoint. Must not use with densities.

class

Optional. String. Image class. Merged with implementation.

densities

Optional. String. Float numbers suffixed with an "x", delimited by spaces. The pixel densities of the image to generate. There must be at least two. The largest density matches the original image. Examples are 1x 2x, 1x 1.5x 2x 2.5x 3x, and 0.5x 1.33x 6x 10x. Must not use with breakpoints.

fetchpriority

Optional. String. Must be high or low.

height

Optional. String. CSS value. Image height.

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, or start.

linked

Optional. String. Hugo image processing methods and options, mixed together, for the linked image. If no method is specified, resize is used. If no image dimensions are specified, the originals are used. If it is unprocessed, it is unprocessed. If it is default, the default options are used.

loading

Optional. String. Must be eager (default) or lazy.

maxheight

Optional. String. CSS value. Maximum image height.

maxwidth

Optional. String. CSS value. Maximum image width.

process

Optional. String. Hugo image processing methods and options, mixed together, for the displayed image. If no method is specified, resize is used. If no image dimensions are specified, the originals are used. If it is default, the default options are used.

style

Optional. String. CSS. Image style. Merged with implementation.

type

Optional. String. Type of layout. Must be grid or rows (default).

width

Optional. String. CSS value. Image width.

Body: Optional. String. HTML. The images.

### Icon

The `paige/icon` shortcode provides a web font icon.

```
{{< paige/icon
class=""
title=""
url="" >}}
```

Parameters:


class

Required. Position 0. String. <i> class. Example: bi bi-github.

title

Optional. String. The screen reader description and anchor title. Example: GitHub.

url

Optional. String. URL. Example: https://github.com/account/project. E-mails in URLs with a mailto: scheme are protected from web crawlers.

Body: None.

### Image

The `paige/image` shortcode provides an image.

```
{{< paige/image
alt=""
breakpoints=false
class=""
densities=""
fetchpriority=""
height=""
link=""
linked=""
loading=""
maxheight=""
maxwidth=""
process=""
sizes=""
src=""
srcset=""
style=""
title=""
width="" >}}
```

Parameters:


alt

Optional. String. Plain text. Image alt.

breakpoints

Optional. Boolean. Whether to generate copies of the image sized to each Bootstrap breakpoint. Must not use with densities, sizes, or srcset.

class

Optional. String. Class attribute value.

densities

Optional. String. Float numbers suffixed with an "x", delimited by spaces. The pixel densities of the image to generate. There must be at least two. The largest density matches the original image. Examples are 1x 2x, 1x 1.5x 2x 2.5x 3x, and 0.5x 1.33x 6x 10x. Must not use with breakpoints, sizes, or srcset.

fetchpriority

Optional. String. Must be high or low.

height

Optional. String. CSS value. Image height.

link

Optional. String. URL. Image link. Must not use with linked.

linked

Optional. String. Hugo image processing methods and options, mixed together, for the linked image. If no method is specified, resize is used. If no image dimensions are specified, the originals are used. If it is unprocessed, it is unprocessed. If it is default, the default options are used. Must not use with link.

loading

Optional. String. Must be eager (default) or lazy.

maxheight

Optional. String. CSS value. Image maximum height.

maxwidth

Optional. String. CSS value. Image maximum width.

process

Optional. String. Hugo image processing methods and options, mixed together, for the displayed image. If no method is specified, resize is used. If no image dimensions are specified, the originals are used. If it is default, the default options are used.

sizes

Optional. String. Image sizes. Must not be set with breakpoints or densities.

src

Required. Position 0. String. URL. Image source.

srcset

Optional. String. Image srcset. Must not be set with breakpoints or densities.

style

Optional. String. CSS. Image style. Merged with implementation.

title

Optional. String. Plain text. Image title.

width

Optional. String. CSS value. Image width.

Body: None.

### Quote

The `paige/quote` shortcode provides a quotation.

```
{{< paige/quote
cite="" >}}

{{< /paige/quote >}}
```

Parameters:


cite

Optional. String. Plain text. Citation.

Body: Required. String. Markdown. The quotation.

### Request

The `paige/request` shortcode provides the content for a URL.

```
{{< paige/request
method=""
url="" >}}
```

Parameters:


method

Optional. String. HTTP method. Default is get.

url

Required. String. URL.

Body: None.

### Tabs

The `paige/tabs` shortcode provides tab buttons and tab panes.
It must contain one `paige/tabs/buttons` shortcode, and then one `paige/tabs/panes` shortcode.

```
{{< paige/tabs >}}

{{< /paige/tabs >}}
```

Parameters: None.

Body: Required. String. HTML. The tab buttons and tab panes.

The `paige/tabs/buttons` shortcode provides tab buttons.
It must contain one or more `paige/tabs/button` shortcodes.
Each `paige/tabs/button` shortcode corresponds to the `paige/tabs/pane` shortcode in the same position.

```
{{< paige/tabs/buttons >}}

{{< /paige/tabs/buttons >}}
```

Parameters: None.

Body: Required. String. HTML. The tab buttons.

The `paige/tabs/button` shortcode provides a tab button.

```
{{< paige/tabs/button >}}

{{< /paige/tabs/button >}}
```

Parameters: None.

Body: Required. String. Markdown. The tab button content.

The `paige/tabs/panes` shortcode provides tab panes.
It must contain one or more `paige/tabs/pane` shortcodes.
Each `paige/tabs/pane` shortcode corresponds to the `paige/tabs/button` shortcode in the same position.

```
{{< paige/tabs/panes >}}

{{< /paige/tabs/panes >}}
```

Parameters: None.

Body: Required. String. HTML. The tab panes.

The `paige/tabs/pane` shortcode provides a tab pane.

```
{{< paige/tabs/pane >}}

{{< /paige/tabs/pane >}}
```

Parameters: None.

Body: Required. String. Markdown. The tab pane content.

### Vimeo

The `paige/vimeo` shortcode provides a Vimeo video.

```
{{< paige/vimeo
autopause=false
autoplay=false
background=false
byline=false
color=""
controls=false
description=""
dnt=false
fullscreen=false
height=""
keyboard=false
loop=false
maxheight=""
maxwidth=""
muted=false
pip=false
playsinline=false
portrait=false
quality=""
speed=false
texttrack=false
time=""
title=false
transparent=false
video=""
width="" >}}
```

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.

height

Optional. String. CSS value. Video height.

keyboard

Optional. Boolean. Enable keyboard input. Default is true.

loop

Optional. Boolean. Loop the video. Default is false.

maxheight

Optional. String. CSS value. Video maximum height.

maxwidth

Optional. String. CSS value. Video maximum width.

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, or 4k. Default is auto.

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 is false.

time

Optional. String. Duration (e.g. 0m, 1m2s). Start time. Default is 0m.

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.

width

Optional. String. CSS value. Video width.

Body: None.

See [Vimeo documentation](https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Player-parameters-overview) for more detail.

### YouTube

The `paige/youtube` shortcode provides a YouTube video.

```
{{< paige/youtube
autoplay=false
controls=false
description=""
end=0
fullscreen=false
height=""
list=""
loop=false
maxheight=""
maxwidth=""
mute=false
start=0
video=""
width="" >}}
```

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.

height

Optional. String. CSS value. Video height.

list

Optional. String. Playlist ID.

loop

Optional. Boolean. Loop the video.

maxheight

Optional. String. CSS value. Video maximum height.

maxwidth

Optional. String. CSS value. Video maximum width.

mute

Optional. Boolean. Mute the video.

start

Optional. Integer. Elapsed seconds. Start the video here.

video

Optional. Position 0. String. Video ID.

width

Optional. String. CSS value. Video width.

Body: None.

## Customize

### Include

| If this file exists | It is included at |
| ---------------------------------------------------------| -------------------------------------|
| `yoursite/layouts/partials/paige/body-first.html` | The beginning of the body tag |
| `yoursite/layouts/partials/paige/body-last.html` | The end of the body tag |
| `yoursite/layouts/partials/paige/head-first.html` | The beginning of the head tag |
| `yoursite/layouts/partials/paige/head-last.html` | The end of the head tag |
| `yoursite/layouts/partials/paige/page-footer-first.html` | The beginning of the page footer tag |
| `yoursite/layouts/partials/paige/page-footer-last.html` | The end of the page footer tag |
| `yoursite/layouts/partials/paige/page-header-first.html` | The beginning of the page header tag |
| `yoursite/layouts/partials/paige/page-header-last.html` | The end of the page header tag |
| `yoursite/layouts/partials/paige/site-first.html` | The beginning of the main tag |
| `yoursite/layouts/partials/paige/site-last.html` | The end of the main tag |
| `yoursite/layouts/partials/paige/site-footer-first.html` | The beginning of the site footer tag |
| `yoursite/layouts/partials/paige/site-footer-last.html` | The end of the site footer tag |
| `yoursite/layouts/partials/paige/site-header-first.html` | The beginning of the site header tag |
| `yoursite/layouts/partials/paige/site-header-last.html` | The end of the site header tag |
| `yoursite/layouts/partials/paige/style-first.css` | The beginning of the style tag |
| `yoursite/layouts/partials/paige/style-last.css` | The end of the style tag |

### Override

Most code is in partial templates that the layout templates use.
Code can be added, changed, or removed easily by overriding the corresponding layout or partial template.

For example, `layouts/_default/list.html` and `layouts/_default/single.html` include `layouts/partial/paige/page.html`.
`layouts/partial/paige/page.html` includes `layouts/partial/paige/page-header.html`.
To change the page title for those layout templates, change `layouts/partial/paige/page-header.html`.

To change the page title for `layouts/_default/single.html` only,
replace the inclusion of `layouts/partial/paige/page.html` in `layouts/_default/single.html` with its content,
then in that, replace the inclusion of `layouts/partial/paige/page-header.html` with its content,
then in that, change the page title.

To change the favicon, override these files:

- `static/android-chrome-192x192.png`
- `static/android-chrome-512x512.png`
- `static/apple-touch-icon-114x114-precomposed.png`
- `static/apple-touch-icon-114x114.png`
- `static/apple-touch-icon-120x120-precomposed.png`
- `static/apple-touch-icon-120x120.png`
- `static/apple-touch-icon-144x144-precomposed.png`
- `static/apple-touch-icon-144x144.png`
- `static/apple-touch-icon-152x152-precomposed.png`
- `static/apple-touch-icon-152x152.png`
- `static/apple-touch-icon-180x180-precomposed.png`
- `static/apple-touch-icon-180x180.png`
- `static/apple-touch-icon-57x57-precomposed.png`
- `static/apple-touch-icon-57x57.png`
- `static/apple-touch-icon-60x60-precomposed.png`
- `static/apple-touch-icon-60x60.png`
- `static/apple-touch-icon-72x72-precomposed.png`
- `static/apple-touch-icon-72x72.png`
- `static/apple-touch-icon-76x76-precomposed.png`
- `static/apple-touch-icon-76x76.png`
- `static/apple-touch-icon-precomposed.png`
- `static/apple-touch-icon.png`
- `static/favicon-16x16.png`
- `static/favicon-32x32.png`
- `static/favicon.ico`
- `static/favicon.png`
- `static/favicon.svg`
- `static/mstile-144x144.png`
- `static/mstile-150x150.png`
- `static/mstile-310x150.png`
- `static/mstile-310x310.png`
- `static/mstile-70x70.png`
- `static/safari-pinned-tab.svg`

You can generate these favicon files [here](https://realfavicongenerator.net).

To change the syntax highlighting styles, override these files [with your own](https://gohugo.io/content-management/syntax-highlighting/#generate-syntax-highlighter-css):

- `layouts/partials/paige/dark.css`
- `layouts/partials/paige/light.css`

### Extend

Use CSS selectors to extend the default styling.

Page identifiers:


#paige-alert

The page alert.

#paige-authors

The page authors.

#paige-breadcrumbs

The site breadcrumbs.

#paige-collections

The site collection pages.

#paige-collections-header

The site collection pages header.

#paige-comments

The page comments.

#paige-content

The page content.

#paige-copyright

The site copyright.

#paige-credit

The site credit.

#paige-date

The page date.

#paige-edit

The page edit link.

#paige-file

The page edit and history links.

#paige-history

The page history link.

#paige-keywords

The page keywords.

#paige-license

The site license.

#paige-menu

The site menu.

#paige-metadata

The page metadata.

#paige-next

The next page link.

#paige-page-description

The page description.

#paige-page-footer

The page footer that contains the page edit, history, next, and previous links.

#paige-page-header

The page header that contains the page title, description, metadata, and table of contents.

#paige-page-title

The page title.

#paige-pages

The page sub-pages.

#paige-pages-header

The page sub-pages header.

#paige-pagination

The pagination of sub-pages.

#paige-prev

The previous page link.

#paige-reading-time

The page reading time.

#paige-sections

The page section sub-pages.

#paige-sections-header

The page section sub-pages header.

#paige-series

The page series.

#paige-siblings

The page next and previous links.

#paige-site-description

The site description.

#paige-site-footer

The site footer that contains the site copyright, license, and credit.

#paige-site-header

The site header that contains the site title, description, menu, and breadcrumbs.

#paige-site-title

The site title.

#paige-toc

The table of contents.

Page classes:


.paige-keyword

A keyword.

.paige-keyword-category

A category keyword.

.paige-keyword-tag

A tag keyword.

.paige-keywords

The keywords.

Sub-page classes:


.paige-authors

The authors.

.paige-date

The date.

.paige-description

The description.

.paige-metadata

The metadata.

.paige-page

A page.

.paige-reading-time

The reading time.

.paige-series

The series.

.paige-summary

The summary.

.paige-title

The title.

Page kind classes:


.paige-kind-home

The container element of pages with kind "home".

.paige-kind-section

The container element of pages with kind "section".

.paige-kind-page

The container element of pages with kind "page".

.paige-kind-taxonomy

The container element of pages with kind "taxonomy".

.paige-kind-term

The container element of pages with kind "term".

Page status classes:


.paige-draft

The container element of draft pages.

.paige-expired

The container element of expired pages.

.paige-future

The container element of future pages.

.paige-modified

The container element of modified pages.

.paige-published

The container element of published pages.

.paige-unpublished

The container element of unpublished pages.

Shortcode classes:


.paige-code

The container element of paige/code shortcodes.

.paige-email

The container element of paige/email shortcodes.

.paige-figure

The container element of paige/figure shortcodes.

.paige-gallery

The container element of paige/gallery shortcodes.

.paige-icon

The container element of paige/icon shortcodes.

.paige-image

The container element of paige/image shortcodes.

.paige-quote

The container element of paige/quote shortcodes.

.paige-vimeo

The container element of paige/vimeo shortcodes.

.paige-youtube

The container element of paige/youtube shortcodes.

### Minimal look

By default, everything is shown.
If you want a more minimal look,
try the following in `yoursite/hugo.toml`:

```toml
[params.paige.list_page]
disable_authors = true
disable_date = true
disable_keywords = true
disable_reading_time = true
disable_series = true
disable_summary = true

[params.paige.page]
disable_authors = true
disable_date = true
disable_keywords = true
disable_next = true
disable_prev = true
disable_reading_time = true
disable_series = true
disable_toc = true
```

### Narrow look

By default, the content expands to fill the whole window.
This can result in very long lines, depending on the window width.
To use [the recommended line length of 66 characters](https://en.wikipedia.org/wiki/Line_length#Printed_text) (40rem),
try the following in `yoursite/hugo.toml`:

```toml
[params.paige]
style = """
#paige-content > * { margin-left: auto; margin-right: auto; max-width: 40rem; }
"""
```

### Narrow-and-wide look

By default, the content expands to fill the whole window.
This can result in very long lines, depending on the window width.
To use [the recommended line length of 66 characters](https://en.wikipedia.org/wiki/Line_length#Printed_text) (40rem)
for all content except media,
try the following in `yoursite/hugo.toml`:

```toml
[params.paige]
style = """
#paige-content > * { margin-left: auto; margin-right: auto; max-width: 40rem; }
#paige-content > img,
#paige-content > .paige-image,
#paige-content > .paige-vimeo,
#paige-content > .paige-youtube { max-width: 100%; }
"""
```

### Menu navigation only

If you configure a menu, and intend for it to be sufficient for all navigation,
you should hide the breadcrumbs on every page,
and hide the collection, section, and page lists on the home page if you use the default home page layout.

To hide the breadcrumbs on every page,
try the following in `yoursite/hugo.toml`:

```toml
[params.paige.site]
disable_breadcrumbs = true
```

To hide the collection, section, and page lists on the home page,
try the following in `yoursite/content/_index.md`:

```toml
[params.paige.list_page]
disable_collections = true
disable_pages = true
disable_sections = true
```

## Credits

- Photos by [Lanty](https://unsplash.com/@photos_by_lanty)
- Photo by [Sergey Pesterev](https://unsplash.com/photos/JV78PVf3gGI)

## Project

Created by [Will Faught](https://willfaught.com).
Released under the [MIT License](https://spdx.org/licenses/MIT.html).
Hosted at https://github.com/willfaught/paige.