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

docs: reorganize and revise user docs #498

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
242 changes: 103 additions & 139 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export default defineConfig({
defer: true,
'data-website-id': '3b8cb97a-2a94-43c2-85e7-277c92c9cf48',
src: 'https://ilf-site-analytics.netlify.app/script.js',
'data-domains': 'webmonetization.org'
}
}
'data-domains': 'webmonetization.org',
},
},
],
customCss: [
'./node_modules/@interledger/docs-design-system/src/styles/teal-theme.css',
Expand All @@ -39,19 +39,12 @@ export default defineConfig({
borderRadius: 'var(--border-radius)',
},
},
defaultLocale: 'root',
locales: {
root: {
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 @@ -62,185 +55,156 @@ export default defineConfig({
},
sidebar: [
{
label: 'Intro to Web Monetization',
collapsed: true,
label: 'Overview',
link: '/docs/',
},
{
label: 'For content consumers',
collapsed: false,
items: [
{
label: 'Overview',
link: '/docs/',
link: 'supporters/overview',
},
{
label: 'Sending payments',
link: '/docs/intro/sending-payments',
label: 'Get started',
link: 'supporters/get-started',
},
{
label: 'Receiving payments',
link: '/docs/intro/receiving-payments',
},
{
label: 'Web Monetization flow',
link: '/docs/intro/web-monetization-flow',
},
{
label: 'Web Monetization extension',
link: '/docs/intro/web-monetization-extension',
label: 'Learn about sending payments',
link: '/supporters/about-sending',
},
],
},
{
label: 'References',
collapsed: true,
label: 'For content owners',
collapsed: false,
items: [
{
label: 'Overview',
link: '/developers/overview',
},
{
label: 'Get started',
link: '/developers/get-started',
},
{
label: 'Learn about receiving payments',
link: '/developers/about-receiving',
},
],
},
{
label: 'For developers',
collapsed: false,
items: [
{
label: 'Web Monetization API',
label: 'Tutorials',
collapsed: true,
items: [
{
label: 'HTML <link> rel=monetization',
link: '/docs/references/html-link-rel-monetization',
label: 'Show content to paying visitors',
link: '/tutorials/show-content',
},
{
label: 'Monetization events',
collapsed: true,
label: 'Remove content for paying visitors',
link: '/tutorials/remove-content',
},
{
label: "Show visitors how much they've contributed",
link: '/tutorials/contribution-counter',
},
{
label: 'Set up probabilistic revenue sharing',
link: '/tutorials/revenue-sharing',
},
{
label: 'Test Web Monetization',
link: '/tutorials/test-web-monetization',
},
],
},
{
label: 'Libraries',
link: '/developers/libraries',
},
{
label: 'API docs',
collapsed: true,
items: [
{
label: 'HTML DOM API',
collapsed: false,
items: [
{
label: 'MonetizationEvent',
link: '/docs/references/monetizationevent',
},
{
label: 'amountSent',
link: '/docs/references/attributes/amountsent',
},
{
label: 'incomingPayment',
link: '/docs/references/attributes/incomingpayment',
},
{
label: 'paymentPointer',
link: '/docs/references/attributes/paymentpointer',
label: 'Monetization <link> element',
link: '/developers/link-element',
},
],
},
{
label: 'Web Monetization API',
collapsed: false,
items: [
{
label: 'amount',
link: '/docs/references/attributes/amount',
badge: { text: 'deprecated', variant: 'danger' },
label: 'Monetization interfaces',
link: '/developers/interfaces',
},
{
label: 'assetCode',
link: '/docs/references/attributes/assetcode',
badge: { text: 'deprecated', variant: 'danger' },
label: 'Monetization events',
link: '/developers/events',
},
],
},
{
label: 'HTTP Headers',
collapsed: true,
items: [
{
label: 'assetScale',
link: '/docs/references/attributes/assetscale',
badge: { text: 'deprecated', variant: 'danger' },
label: 'Content Security Policy (CSP)',
link: '/developers/csp',
},
{
label: 'receipt',
link: '/docs/references/attributes/receipt',
badge: { text: 'deprecated', variant: 'danger' },
label: 'Permissions Policy',
link: '/developers/permissions-policy',
},
],
},
],
},
{
label: 'HTTP headers',
items: [
{
label: 'Content-Security-Policy: monetization-src',
link: '/docs/references/csp-monetization-src',
},
{
label: 'Permissions-Policy: monetization',
link: '/docs/references/permissions-policy-monetization',
},
],
},
{
label: 'Events',
items: [
{
label: 'GlobalEventHandlers: onmonetization',
link: '/docs/references/onmonetization',
},
],
},
],
},
{
label: 'Guides',
collapsed: true,
items: [
{
label: 'Add Web Monetization to a page',
link: '/docs/guides/monetize-page',
label: 'Feed (RSS, Atom, JSON Feed)',
link: '/developers/rss-atom-jsonfeed',
},
{
label: 'Remove ads',
link: '/docs/guides/remove-ads',
label: 'Social (Activity Streams)',
link: '/developers/activity-streams',
},
{
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: 'Web Monetization Specification',
link: 'https://webmonetization.org/specification/',
attrs: { target: '_blank' },
},
],
},
{
label: 'Compatible digital wallets',
link: '/wallets',
},
{
label: 'Resources',
collapsed: true,
collapsed: false,
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
9 changes: 9 additions & 0 deletions public/ns.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"@context": {
"wm": "https://webmonetization.org/ns#",
"monetization": {
"@id": "wm:monetization",
"@type": "@id"
}
}
}
4 changes: 2 additions & 2 deletions src/components/pages/ProbRevshare/components/_active-view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export function ActiveView() {
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 href='/docs/developers/get-started' target='_blank'>
this page
</a>{' '}
if you need help.
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { docsSchema, i18nSchema } from '@astrojs/starlight/schema'

export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
i18n: defineCollection({ type: 'data', schema: i18nSchema() })
i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
}
Loading