This repo is the code behind webmonetization.org
It is the home of the proposed Web Monetization standard currently incubating at the WICG.
You can view the explainer, or read the proposed spec.
This website was created with Docusaurus and contributions are welcome as pull requests.
- Make sure all the dependencies for the website are installed:
# Install dependencies
$ cd website
$ yarn
- Run your dev server:
# Start the site
$ yarn start
Your project file structure should look something like this
webmonetization.org
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── LICENSE.md
├── README.md
├── docker-compose.yml
├── docs
│ ├── api.md
│ ├── assets
│ │ ├── ec-generate.svg
│ │ ├── ec-unlock.svg
│ │ ├── flow.svg
│ │ ├── gatehub-addwallet.gif
│ │ ├── gatehub-exchangeorder.png
│ │ ├── gatehub-findpointer.gif
│ │ ├── gatehub.png
│ │ ├── uphold
│ │ ├── uphold.svg
│ │ └── xrpmigration
│ ├── counter.md
│ ├── exclusive-content.md
│ ├── explainer.md
│ ├── gatehub.md
│ ├── getting-started.md
│ ├── glossary.md
│ ├── ilp-wallets.md
│ ├── probabilistic-rev-sharing.md
│ ├── receipt-verifier.md
│ ├── receiving.md
│ ├── remove-ads.md
│ ├── resources.md
│ ├── sending.md
│ ├── specification.md
│ ├── start-stop.md
│ ├── stronghold.md
│ ├── uphold.md
│ └── xrptipbot.md
├── docusaurus.config.js
├── i18n
│ └── en.json
├── package.json
├── sidebars.json
├── src
│ ├── page-support
│ ├── exclusive-content
│ │ |── prob-revshare
│ └── shared
│ └── pages
│ ├── docs.js
│ │ ├── exclusive-content.js
│ ├── index.js
│ ├── meta-tag.js
│ └── prob-revshare.js
├── static
│ ├── CNAME
│ ├── css
│ │ └── custom.css
│ ├── img
│ │ ├── 11ty_webmo_logo.png
│ │ ├── angular_webmo_logo.svg
│ │ ├── awesome_webmo_logo.svg
│ │ ├── coil_logo.svg
│ │ ├── copy_icon.svg
│ │ ├── fav-webmonetization.png
│ │ ├── favicon.ico
│ │ ├── gatehub_logo.svg
│ │ ├── gatsby_webmo_logo.svg
│ │ ├── grey_wm_logo.svg
│ │ ├── gridsome_webmo_logo.svg
│ │ ├── hugo_webmo_logo.svg
│ │ ├── infinity_search_logo.svg
│ │ ├── puma-logo.svg
│ │ ├── runnaroo_logo.svg
│ │ ├── stronghold_logo.svg
│ │ ├── svelte_webmo_logo.svg
│ │ ├── tessy_webmo_logo.svg
│ │ ├── tipbot_logo.svg
│ │ ├── uphold-logo.svg
│ │ ├── uphold_logo.svg
│ │ ├── vuepress_webmo_logo.png
│ │ ├── webmon_icon.svg
│ │ ├── webmon_icon_simple.svg
│ │ ├── wm-icon-animated.svg
│ │ └── wm-icon.svg
│ ├── js
│ │ ├── custom.js
│ │ └── exclusive-content.js
│ ├── service-worker.js
│ └── specification.html
├── w3c.json
├── workers
│ ├── README.md
│ ├── exclusive-content
│ │ ├── dist
│ │ ├── node_modules
│ │ ├── package.json
│ │ ├── README.md
│ │ ├── rollup.config.js
│ │ ├── src
│ │ ├── wrangler.toml
│ │ └── yarn.lock
│ |── probabilistic-revshare
│ | ├── README.md
│ | ├── package.json
│ | ├── rollup.config.js
│ | ├── src
│ | ├── tsconfig.json
│ | ├── wrangler.toml
│ | └── yarn.lock
│ └── receipt-verifier
│ ├── package.json
│ ├── README.md
│ ├── rollup.config.js
│ ├── src
│ ├── tsconfig.json
│ ├── wrangler.toml
│ └── yarn.lock
└── yarn.lock
Edit docs by navigating to docs/
and editing the corresponding document:
docs/doc-to-be-edited.md
---
id: page-needs-edit
title: This Doc Needs To Be Edited
---
Edit me...
For more information about docs, click here
- Create the doc as a new markdown file in
/docs
, exampledocs/newly-created-doc.md
:
---
id: newly-created-doc
title: This Doc Needs To Be Edited
---
My new content here..
- Refer to that doc's ID in an existing sidebar in
website/sidebar.json
:
// Add newly-created-doc to the Getting Started category of docs
{
"docs": {
"Getting Started": [
"quick-start",
"newly-created-doc" // new doc here
],
...
},
...
}
For more information about adding new docs, click here
- Add links to docs, custom pages or external links by editing the
themeConfig.navbar.links
field ofdocusaurus.config.js
:
docusaurus.config.js
module.exports = {
// ...
themeConfig: {
navbar: {
links: [
{
// Client-side routing, used for navigating within the website.
// The baseUrl will be automatically prepended to this value.
to: 'docs/introduction',
// A full-page navigation, used for navigating outside of the website.
// You should only use either `to` or `href`.
href: 'https://www.facebook.com',
// Prepends the baseUrl to href values.
prependBaseUrlToHref: true,
// The string to be shown.
label: 'Introduction',
// Left or right side of the navbar.
position: 'left', // or 'right'
// To apply the active class styling on all
// routes starting with this path.
// This usually isn't necessary
activeBasePath: 'docs',
// Alternative to activeBasePath if required.
activeBaseRegex: 'docs/(next|v8)',
// Custom CSS class (for styling any item).
className: '',
},
// ... other links
],
},
// ...
},
}
For more information about the navigation bar, click here
- Docusaurus uses React components to build pages. The components are saved as
.js files in
src/pages
: - If you want your page to show up in your navigation header, you will need to
update the
themeConfig.navbar.links
field ofdocusaurus.config.js
(see above).
website/siteConfig.js
module.exports = {
// ...
themeConfig: {
navbar: {
links: [
{
to: 'my-new-custom-page',
label: 'My New Custom Page',
position: 'left', // or 'right'
},
],
},
},
}
For more information about custom pages, click here.
Full documentation can be found on the website.