Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: massive docs rewrite #473

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
07ab7a1
docs: post work week doc reorg
melissahenderson Jul 19, 2024
483f6f4
Update docs.mdx with reminder
melissahenderson Jul 23, 2024
fd1871b
more updates
melissahenderson Jul 23, 2024
c2e1b93
doc updates
melissahenderson Jul 23, 2024
ded6552
fix broken link
melissahenderson Jul 23, 2024
cd9481f
updates
melissahenderson Jul 25, 2024
210e964
Updates
melissahenderson Jul 29, 2024
bb8bcbe
updates
melissahenderson Jul 30, 2024
ce66de3
update-eleventy-billion
melissahenderson Jul 31, 2024
7753e37
updates
melissahenderson Aug 1, 2024
9fe1a6a
resolve libraries page error
huijing Aug 20, 2024
ab8d1da
various and sundry updates
melissahenderson Aug 20, 2024
78dcde1
docs: wm site refresh
melissahenderson Dec 19, 2024
147b643
Merge branch 'main' into mh-post-ww2
melissahenderson Dec 19, 2024
696d61c
Update src/content/docs/experiment/how-payments-work.mdx
melissahenderson Jan 21, 2025
e45434a
Update src/content/docs/experiment/how-payments-work.mdx
melissahenderson Jan 21, 2025
617e83d
Update src/content/docs/experiment/how-payments-work.mdx
melissahenderson Jan 21, 2025
09ff643
Update src/content/docs/experiment/how-payments-work.mdx
melissahenderson Jan 21, 2025
334ba2d
Update src/content/docs/experiment/how-payments-work.mdx
melissahenderson Jan 21, 2025
2310e2e
Update src/content/docs/experiment/how-payments-work.mdx
melissahenderson Jan 21, 2025
6a2f83e
Update src/content/docs/experiment/link-element.mdx
melissahenderson Jan 21, 2025
d3a39e9
Update src/content/docs/experiment/link-element.mdx
melissahenderson Jan 21, 2025
7148f06
Update src/content/docs/support/how-payments-work.mdx
melissahenderson Jan 21, 2025
9af4e74
Update src/content/docs/experiment/onmonetization.mdx
melissahenderson Jan 21, 2025
ae054d7
docs: feedback updates and extension guide
melissahenderson Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 84 additions & 121 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ export default defineConfig({
label: 'English',
lang: 'en',
},
es: {
label: 'Español',
lang: 'es',
},
fr: {
label: 'Français',
lang: 'fr',
},
},
components: {
Header: './src/components/docs/Header.astro',
Expand All @@ -64,180 +56,151 @@ export default defineConfig({
sidebar: [
{
label: 'Intro to Web Monetization',
link: '/docs/',
},
{
label: 'Support web monetized content',
collapsed: true,
items: [
{
label: 'Overview',
link: '/docs/',
link: '/support/overview',
},
{
label: 'Sending payments',
link: '/docs/intro/sending-payments',
label: 'Quick start guide',
link: '/support/quick-start',
},
{
label: 'Receiving payments',
link: '/docs/intro/receiving-payments',
label: 'Use the extension',
link: '/support/use-extension',
},
{
label: 'Web Monetization flow',
link: '/docs/intro/web-monetization-flow',
label: 'How payments work',
link: '/support/how-payments-work',
},
],
},
{
label: 'References',
label: 'Experiment with Web Monetization',
collapsed: true,
items: [
{
label: 'Web Monetization API',
label: 'Overview',
link: '/experiment/overview',
},
{
label: 'Quick start guide',
link: '/experiment/quick-start',
},
{
label: 'How payments work',
link: '/experiment/how-payments-work',
},
{
label: 'Developer corner',
collapsed: true,
items: [
{
label: 'HTML <link> rel=monetization',
link: '/docs/references/html-link-rel-monetization',
},
{
label: 'Monetization events',
label: 'Guides',
collapsed: true,
items: [
{
label: 'MonetizationEvent',
link: '/docs/references/monetizationevent',
},
{
label: 'amountSent',
link: '/docs/references/attributes/amountsent',
label: 'Show content to paying visitors',
link: '/experiment/guides/show-content',
},
{
label: 'incomingPayment',
link: '/docs/references/attributes/incomingpayment',
label: 'Remove content for paying visitors',
link: '/experiment/guides/remove-content',
},
{
label: 'paymentPointer',
link: '/docs/references/attributes/paymentpointer',
label: 'Show visitors how much they\'ve contributed',
link: '/experiment/guides/contribution-counter',
},
{
label: 'amount',
link: '/docs/references/attributes/amount',
badge: { text: 'deprecated', variant: 'danger' },
label: 'Set up probabilistic revenue sharing',
link: '/experiment/guides/revenue-sharing',
},
{
label: 'assetCode',
link: '/docs/references/attributes/assetcode',
badge: { text: 'deprecated', variant: 'danger' },
label: 'Test Web Monetization',
link: '/experiment/guides/test-web-monetization',
},
],
},
{
label: 'APIs',
collapsed: true,
items: [
{
label: 'assetScale',
link: '/docs/references/attributes/assetscale',
badge: { text: 'deprecated', variant: 'danger' },
label: 'HTML DOM API',
collapsed: false,
items: [
{
label: 'Monetization <link> element',
link: '/experiment/link-element',
},
],
},
{
label: 'receipt',
link: '/docs/references/attributes/receipt',
badge: { text: 'deprecated', variant: 'danger' },
label: 'Web Monetization API',
collapsed: false,
items: [
{
label: 'Monetization interfaces',
link: '/experiment/wmapi-interfaces',
},
{
label: 'Monetization events',
link: '/experiment/events',
},
],
},
],
},
],
},
{
label: 'HTTP headers',
items: [
{
label: 'Content-Security-Policy: monetization-src',
link: '/docs/references/csp-monetization-src',
label: 'HTTP Headers',
collapsed: true,
items: [
{
label: 'Content Security Policy (CSP)',
link: '/experiment/csp',
},
{
label: 'Permissions Policy',
link: '/experiment/permissions-policy',
},
],
},
{
label: 'Permissions-Policy: monetization',
link: '/docs/references/permissions-policy-monetization',
label: 'Libraries',
link: '/experiment/libraries',
},
],
},
{
label: 'Events',
items: [
{
label: 'GlobalEventHandlers: onmonetization',
link: '/docs/references/onmonetization',
label: 'Web Monetization Specification',
link: 'https://webmonetization.org/specification/',
attrs: { target: '_blank' },
},
],
},
],
},
{
label: 'Guides',
collapsed: true,
items: [
{
label: 'Add Web Monetization to a page',
link: '/docs/guides/monetize-page',
},
{
label: 'Remove ads',
link: '/docs/guides/remove-ads',
},
{
label: 'Provide exclusive content',
link: '/docs/guides/provide-exclusive-content',
},
{
label: 'Set up probabilistic revenue sharing',
link: '/docs/guides/set-up-probabilistic-revenue-sharing',
},
{
label: 'Add a streaming payments counter',
link: '/docs/guides/add-a-streaming-payments-counter',
},
],
label: 'Compatible digital wallets',
link: '/resources/wallets',
},
{
label: 'Resources',
collapsed: true,
items: [
{
label: 'Glossary',
link: '/docs/resources/glossary',
},
{
label: 'Libraries',
link: '/docs/resources/libraries',
},
{
label: 'Web Monetization-enabled wallets',
link: '/docs/resources/op-wallets',
link: '/resources/glossary',
},
{
label: 'Get involved',
link: '/docs/resources/get-involved',
},
{
label: 'Interledger',
link: 'https://interledger.org/',
attrs: {
target: '_blank',
rel: 'noopener noreferrer',
'data-icon': 'external',
},
},
{
label: 'Open Payments API',
link: 'https://openpayments.guide/',
attrs: {
target: '_blank',
rel: 'noopener noreferrer',
'data-icon': 'external',
},
link: '/resources/get-involved',
},
],
},
{
label: 'Specification',
link: 'https://webmonetization.org/specification/',
attrs: {
target: '_blank',
rel: 'noopener noreferrer',
'data-icon': 'external',
},
},
],
}),
react(),
Expand Down
1 change: 0 additions & 1 deletion public/img/docs/diagram-wm-flow.svg

This file was deleted.

Binary file removed public/img/docs/diagram-wm-overview.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/docs/extension/connection-failed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/docs/extension/connection-setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/docs/extension/connection-success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/docs/extension/connection-wallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/docs/extension/default-gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/docs/extension/example-grant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/docs/extension/extension-configure.png
Binary file not shown.
Binary file not shown.
Binary file removed public/img/docs/extension/extension-disconnect.png
Binary file not shown.
Binary file removed public/img/docs/extension/extension-grant.png
Binary file not shown.
Binary file removed public/img/docs/extension/extension-pay.png
Binary file not shown.
Binary file added public/img/docs/extension/otp-send-now.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/docs/extension/otp-success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/docs/extension/rate-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/docs/extension/settings-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/docs/extension/wallet-tab.png
Binary file removed public/img/docs/fynbos/fb-pp.png
Diff not rendered.
Binary file removed public/img/docs/gatehub/gh-add-funds.png
Diff not rendered.
Binary file removed public/img/docs/gatehub/gh-pp.png
Diff not rendered.
6 changes: 5 additions & 1 deletion src/components/docs/PageSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import type { Props } from '@astrojs/starlight/props';
import Default from '@astrojs/starlight/components/PageSidebar.astro';

const removeOverview = [
'docs/resources/glossary',
'resources/glossary',
'resources/get-involved',
'experiment/quick-start',
'experiment/how-payments-work',
'support/how-payments-work',
]
const noOverview = removeOverview.includes(Astro.props.slug);
const toc = noOverview && Astro.props.toc !== undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ export function ActiveView() {
<p className={styles.text}>
If you make any changes to the table, your monetization{' '}
<code>link</code> will change. Be sure to replace your old{' '}
<code>link</code> element with the updated version. Check out{' '}
<a href='/docs/guides/monetize-page' target='_blank'>
Add Web Monetization to a page
</a>{' '}
if you need help.
<code>link</code> element with the updated version.
</p>
<ImportView />
</>
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/ProbRevshare/components/_link-tag.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function SharesLinkTag() {
}

if (!pointer) {
return <p>Enter shares with valid payment pointers and weights.</p>
return <p>Enter shares with valid wallet addresses and/or payment pointers and weights.</p>
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function ShareInputContainer({ children }) {
<thead>
<tr>
<th>Name</th>
<th>Pointer</th>
<th>Wallet Address/Payment Pointer</th>
<th>Weight</th>
<th>Percent</th>
<th></th>
Expand Down
8 changes: 4 additions & 4 deletions src/components/pages/ProbRevshare/lib/_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,24 @@ export function pointerToShares(pointer) {

if (!encodedList) {
throw new Error(
'No share data found. Make sure you copy the whole "content" field from your meta tag.',
'No share data found. Make sure you copy the whole "content" field from your link tag.',
)
}

const pointerList = JSON.parse(fromBase64url(encodedList))

if (!validatePointerList(pointerList)) {
throw new Error(
'Share data is invalid. Make sure you copy the whole "content" from your meta tag.',
'Share data is invalid. Make sure you copy the whole "content" from your link tag.',
)
}
return sharesFromPointerList(pointerList)
} catch (err) {
if (err.name === 'TypeError') {
throw new Error('Meta tag or payment pointer is malformed')
throw new Error('Link tag, wallet address, or payment pointer is malformed')
} else if (err.name === 'SyntaxError') {
throw new Error(
'Payment pointer has malformed share data. Make sure to copy the entire pointer.',
'Wallet address or payment pointer has malformed share data. Make sure to copy the entire address.',
)
} else {
throw err
Expand Down
Loading