Page actions add a per-page dropdown menu with utilities for sharing and inspecting content.
Configuration
All keys go under params in hugo.yaml. pageShowActions can also be set per-page in front matter.
| Key | Type | Description |
|---|---|---|
pageShowActions | bool | Show the page actions menu |
repoURL | string | Branch root URL, enables View Repo Source |
repoSubdir | string | Path from repo root to Hugo project directory; set when the Hugo project is not at the repo root |
repoURL must point to the branch root, not the repository root. For example:
hugo.yaml
params:
pageShowActions: true
repoURL: https://github.com/example/my-site/blob/main
repoSubdir: exampleSite # omit if Hugo project is at repo rootActions
Some actions are always available. Others require additional configuration to activate.
| Action | Condition |
|---|---|
| Copy URL | Always present |
| Copy Markdown | Requires markdown in page outputs |
| View Source | Requires markdown in page outputs |
| View Repo Source | Requires repoURL |
Copy Markdown and View Source serve the raw Markdown of the current page. Hugo only generates this output when markdown is listed under outputs.page:
hugo.yaml
outputs:
page:
- HTML
- markdown