Copy Text
Inline copyable text with a one-click clipboard button. Works anywhere — inside paragraphs, tables, lists, or on its own line. Use it for commands, config values, file paths, or any text a reader might want to copy.
Basic Usage
Install the theme with composer require getgrav/grav-theme-helios
and you're ready to go.
Install the theme with [doc-copy text="composer require getgrav/grav-theme-helios"] and you're ready to go.
Self-Closing vs Container
Use the text parameter for short values:
npm install
Or wrap content between tags:
bin/grav install
[doc-copy text="npm install"]
[doc-copy]bin/grav install[/doc-copy]
Inline in Paragraphs
The config file is located at user/config/system.yaml
. Set the theme to helios
and enable caching with cache: true
.
The config file is located at [doc-copy text="user/config/system.yaml"]. Set the theme to [doc-copy text="helios"] and enable caching with [doc-copy text="cache: true"].
In Tables
| Setting | Value |
|---|---|
| Theme | helios
|
| Cache | true
|
| Debug | false
|
| Setting | Value |
|---------|-------|
| Theme | [doc-copy text="helios"] |
| Cache | [doc-copy text="true"] |
| Debug | [doc-copy text="false"] |
Commands
Run bin/gpm install helios
to install the theme.
Then clear the cache with bin/grav clearcache
.
Run [doc-copy text="bin/gpm install helios"] to install the theme.
Then clear the cache with [doc-copy text="bin/grav clearcache"].
File Paths
Templates are in user/themes/helios/templates/
and CSS is built to build/css/site.css
.
Templates are in [doc-copy text="user/themes/helios/templates/"] and CSS is built to [doc-copy text="build/css/site.css"].
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
text |
Yes* | — | The text to display and copy. Required if self-closing; if using container form, content is used instead. |