- "text": "# Web Monetization\n\nThis is the source code for the website hosted at [webmonetization.org](https://webmonetization.org).\n\nThe website is the home of the proposed Web Monetization standard currently incubating at the [WICG](https://wicg.io/).\n\nYou can read the [docs](https://webmonetization.org/docs/), or read the proposed [specification](https://webmonetization.org/specification).\n\n# Contribute\n\nThe Web Monetization website is built with [Starlight](https://starlight.astro.build/), a documentation framework based on [Astro](https://astro.build/).\n\n- [Get Set Up](#get-set-up)\n- [Content](#content)\n- [Localization/Internationalization](#localizationinternationalization)\n- [Reviews and Approvals](#reviews-and-approvals)\n\n## Get Set Up\n\nWe use [Bun](https://bun.sh/) in this repository, but you could theoretically use the package manager of your choice.\n\n### Install Bun\n\n```sh\ncurl -fsSL https://bun.sh/install | bash\n```\n\n### Install dependencies\n\n```sh\ncd webmonetization\nbun install\n```\n\n### Other commands\n\nAll commands are run from the root of the project, from a terminal:\n\n| Command | Action |\n| :------------------------ | :----------------------------------------------- |\n| `bun run start` | Starts local dev server at `localhost:1100` |\n| `bun run build` | Build your production site to `./dist/` |\n| `bun run preview` | Preview your build locally before deploying |\n| `bun run astro ...` | Run CLI commands like `astro add`, `astro check` |\n| `bun run astro -- --help` | Get help using the Astro CLI |\n\nYou can substitute the bun commands with your chosen package manager's commands.\n\n## Specification Development\n\nPlease refer to the [CONTRIBUTING.md](./CONTRIBUTING.md#specification-development).\n\n## Content\n\nStarlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.\n\n⭐ We recommend using the `.mdx` extension whenever possible.\n\n### Editing content\n\n- [Static image assets](#static-image-assets)\n- [Components](#components)\n- [Edit existing doc](#edit-existing-doc)\n- [Add a new doc](#add-a-new-doc)\n- [Add a custom page](#add-a-custom-page)\n\n#### Static image assets\n\nStatic image assets should be placed in the `public/img/docs` directory. When referencing these assets in the Markdown, don't include `public/` in the file path. For example:\n\n```md\n\n```\n\n⭐ Make your image accessible by including helpful alt text that describes the image.\n⭐ Ensure your file name is descriptive. A file name of `img01.png` isn't helpful.\n⭐ Use hyphens instead of underscores in file names to keep our naming conventions consistent.\n\n#### Components\n\nSome of the commonly repeated patterns within the documentation pages are extracted into custom doc components that can be reused. Some components are shared across other Interledger-related documentation sites and others are specific to Web Monetization. Whether a component is shared determines its import path.\n\nThe `BrowserCompat` and `Specification` components are specific to Web Monetization.\n\n- `BrowserCompat` generates a compatibility table based on the browser compatibility data passed into it. Additional information can be found [here](https://interledger.net/webm/browsercompat/).\n- `Specification` displays a link to the relevant section of the Web Monetization specification in a table. Additional information can be found [here](https://interledger.net/webm/specification/).\n\nDocumentation on how to import and use shared components is available on https://interledger.net/. If you are using multiple shared components on the same page, you can import them like so:\n\n```jsx\nimport { CodeBlock, LinkOut } from '@interledger/docs-design-system'\n```\n\n#### Edit existing doc\n\nNavigate to `/src/content/docs` and locate the page you want to edit. For example:\n\n`/src/content/docs/RELEVANT_FOLDER/doc-to-be-edited.mdx`\n\n```markdown\n---\ntitle: This Doc Needs To Be Edited\n---\n\nEdit me...\n```\n\nRefer to the Starlight documentation on [authoring content](https://starlight.astro.build/guides/authoring-content/) for more detailed guidance.\n\n#### Add a new doc\n\nCreate your Markdown file in in `/src/content/docs/RELEVANT_FOLDER`. For example, within `/src/content/docs/RELEVANT_FOLDER/newly-created-doc.mdx`.\n\n⭐ We recommend using the `.mdx` extension whenever possible.\n\nIf you need help with authoring content, we suggest you refer to the [Starlight documentation](https://starlight.astro.build/guides/authoring-content/) for more detailed guidance.\n\nBe sure to add your new doc to the sidebar! The sidebar is configured in `astro.config.mjs`. Refer to the Starlight documentation on [sidebar configuration](https://starlight.astro.build/reference/configuration/#sidebar) for more information.\n\n#### Add a custom page\n\nAstro is a content-focused web framework that integrates with a lot of existing framework libraries, making it relatively flexible for building customised sites.\n\nCustom pages exist in the `/src/pages` directory, and out-of-the-box come with absolutely nothing. For the Web Monetization website, we have created custom layout components that form the frame of a basic HTML web page, and allow you to add content that would populate the `main` element of the page via a concept known as [slots](https://docs.astro.build/en/basics/astro-components/#slots). A `<slot />` allows you to specify where individual page content should be injected.\n\n```jsx\n---\nimport i18next, { t, changeLanguage } from \"i18next\";\nimport Base from '../layouts/Base.astro';\n---\n<Base>\n /* Page content goes here */\n</Base>\n```\n\nRefer to the Astro documentation on [pages](https://docs.astro.build/en/basics/astro-pages/) for additional details.\n\n## Localization/Internationalization\n\n### Contributions\n\nStarlight supports [Internationalization (i18n)](https://starlight.astro.build/guides/i18n/) out-of-the-box. The Web Monetization site follows the root locale pattern documented at https://starlight.astro.build/guides/i18n/#use-a-root-locale.\n\nIf you want to contribute documentation in a language that has not been configured, you must edit `astro.config.mjs` to add the language to the `locales` option. As of January 2024, Web Monetization is configured for English (en) and Español (es).\n\nTranslated content should be in its respective language folder within `/src/content/docs/`. English content is located within `/src/content/docs`. Content in Español is located within `src/content/docs/es`. Create the language folder if it doesn't exist.\n\nThe file path should follow its corresponding source English path exactly. Once a new language is \"activated\", translated content should be accessible via the language select drop-down in the documentation site's header.\n\nIf an English source page does not have corresponding translations in the selected language, a note will appear at the top of the page informing the user that the page has not been translated yet.\n\n### Reviews\n\nAfter a translation is provided, it must be reviewed by an additional contributor to ensure it's free from typos and that the content is accurate and complete. We won't approve a localization PR that hasn't been reviewed. In some cases, it may take some time to find a reviewer.\n\n## Reviews and Approvals\n\nAfter a PR is submitted, it will be reviewed by a member of the Web Incubator Community Group (WICG). Ensure you're able to receive GitHub notifications so you'll know when the PR is approved and can be merged or if updates are required before approval is given.\n\n## Web Monetization Catchup Call\n\nOur catchup calls are open to our community. We have them every other Thursday at 14:00 GMT, via Google Meet.\n\nTo join the video meeting, click this link: https://meet.google.com/fjy-vjef-ogj\nOtherwise, to join by phone, dial +49 30 300195060 and enter this PIN: 982 511 322 1488#\nTo view more phone numbers, click this link: https://tel.meet/fjy-vjef-ogj?hs=5\n\nVideo call link: https://meet.google.com/fjy-vjef-ogj\n\nOr dial: (DE) 49 30 300195060 and enter this PIN: 982 511 322 1488#\n\nMore phone numbers: https://tel.meet/fjy-vjef-ogj?hs=5\n\n[Add to Google Calendar](https://calendar.google.com/calendar/event?action=TEMPLATE&tmeid=c2dyMjY4M2k1dXRrcjZkYW05Mmo3c2xzZm1fMjAyNDA1MDlUMTMwMDAwWiBjX2NqMDI3Z21oc3VqazkxZXZpMjRkOXB2bXQ0QGc&tmsrc=c_cj027gmhsujk91evi24d9pvmt4%40group.calendar.google.com&scp=ALL)\n"
0 commit comments