✏️ Format WebMonetization docs, fixed typos
This commit is contained in:
parent
ae42c9b93d
commit
d9baa5c592
|
@ -3,7 +3,8 @@ Simple [WebMonetization](https://webmonetization.org/) support for Hugo static g
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
### Config
|
### Config
|
||||||
[Import module](https://gohugo.io/hugo-modules/use-modules/#use-a-module-for-a-theme) in your site configuration:
|
[Import module](https://gohugo.io/hugo-modules/use-modules/#use-a-module-for-a-theme) in your site
|
||||||
|
configuration:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
imports:
|
imports:
|
||||||
|
@ -20,7 +21,8 @@ And inject `monetization` partial in your `<head>` (better in the `_default/base
|
||||||
</head>
|
</head>
|
||||||
```
|
```
|
||||||
|
|
||||||
The template contains logic of meta-tag displaying and preloading of non-blocking script for blocks manipulation.
|
The template contains logic of meta-tag displaying and preloading of non-blocking script for
|
||||||
|
blocks manipulation.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
### Global
|
### Global
|
||||||
|
@ -33,7 +35,8 @@ params:
|
||||||
```
|
```
|
||||||
|
|
||||||
### Local
|
### Local
|
||||||
You can overwrite monetization tag or, if the global parameter is not set, enable monetization only on specific pages by same [param in front matter](https://gohugo.io/variables/page/#page-level-params):
|
You can overwrite monetization tag or, if the global parameter is not set, enable monetization
|
||||||
|
only on specific pages by same [param in front matter](https://gohugo.io/variables/page/#page-level-params):
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
---
|
---
|
||||||
|
@ -42,7 +45,8 @@ monetization: "$wallet.example.com/alice"
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
Use the false value to force the current page monetization to be disabled (if the site is monetized globally):
|
Use the `false` value to force disable the current page monetization (if the site is monetized
|
||||||
|
globally):
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
---
|
---
|
||||||
|
@ -71,16 +75,21 @@ Use `state` parameter to customize the display of monetized content more flexibl
|
||||||
* If no parameter is specified, the "start" state will be used by default: `{{% monetization %}}`
|
* If no parameter is specified, the "start" state will be used by default: `{{% monetization %}}`
|
||||||
|
|
||||||
#### stop
|
#### stop
|
||||||
Use this state to explain what content may be available after activate an add-on or install a compatible browser. This content will be completely hidden from the moment of monetization initialization. This event can also be useful for displaying promotional sections until the page is monetized.
|
Use this state to explain what content may be available after activate an add-on or install a
|
||||||
|
compatible browser. This content will be completely hidden from the moment of monetization
|
||||||
|
initialization. This event can also be useful for displaying promotional sections until the page
|
||||||
|
is monetized.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{% monetization state="stop" %}}
|
{{% monetization state="stop" %}}
|
||||||
Please, install [Coil](https://coil.com/learn-more) browser extension or use [Puma Browser](https://pumabrowser.com/) to see paid content here.
|
Please, install [Coil](https://coil.com/learn-more) browser extension or use
|
||||||
|
[Puma Browser](https://pumabrowser.com/) to see paid content here.
|
||||||
{{% /monetization %}}
|
{{% /monetization %}}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### progress
|
#### progress
|
||||||
This state describes the monetization initialization process and attempts to send the first coins. Use this to describe what happens to visitors with slow connections.
|
This state describes the monetization initialization process and attempts to send the first coins.
|
||||||
|
Use this to describe what happens to visitors with slow connections.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{% monetization state="progress" %}}
|
{{% monetization state="progress" %}}
|
||||||
|
@ -89,7 +98,8 @@ Loading paid content for you...
|
||||||
```
|
```
|
||||||
|
|
||||||
#### start
|
#### start
|
||||||
This state is activated as soon as the first coins are successfully sent. This is the standard state for the monetized block if no parameter was specified.
|
This state is activated as soon as the first coins are successfully sent. This is the standard
|
||||||
|
state for the monetized block if no parameter was specified.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{{% monetization state="start" %}}
|
{{% monetization state="start" %}}
|
||||||
|
|
Loading…
Reference in New Issue