Page Actions
首次發表:
Page actions add a per-page dropdown menu with utilities for sharing and inspecting content.
Configuration
| Key | Type | Description |
|---|---|---|
pageShowActions | bool | Show the page actions menu, can also be set in front matter |
repoURL | string | Branch root URL, enables View Repo Source |
repoSubdir | string | Path from repo root to Hugo project directory |
The repoURL must point to the branch root, not the repository root. If the Hugo project lives in a subdirectory of the repository, set repoSubdir. Config 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
| 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 |
To enable Copy Markdown and View Source, add markdown to the page outputs:
hugo.yaml
outputs:
page:
- HTML
- markdown文章关联
Previous
SearchNext
Backlinks