Skip to content

Commit

Permalink
chore: Resolve all the conflicting changes from the past 4 PRs (#434)
Browse files Browse the repository at this point in the history
* Update CONTRIBUTING.md

* Resolve multiple open PR issues

* Merge all the changes together
  • Loading branch information
huijing authored Feb 14, 2024
1 parent 99ac465 commit 731eb3b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 15 deletions.
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,17 @@ If you added a contributor by mistake, you can remove them in a comment with:

If you are making a pull request on behalf of someone else but you had no part in designing the
feature, you can remove yourself with the above syntax.

## ## Specification Development

If you are interested in actually making changes to the specification, please set up this repository on your local machine first. You can follow the [instructions on the README](./README.md#get-set-up).

The source file for the specification document is at [src/pages/specification/specification-respec.html](https://github.com/WICG/webmonetization/tree/main/src/pages/specification/specification-respec.html). This is the raw ReSpec version that editors should make changes and updates to. Documentation of ReSpec can be accessed on the [ReSpec Wiki](https://github.com/w3c/respec/wiki/).

Preview changes with `npx http-server ./src/pages/specification/` and opening http://localhost:8080/specification-respec.html . (The Astro dev server interferes with example inclusion.)

Export a static HTML version of the specification when your changes are done with `src/pages/specification/respec.sh` . (You may need to install `tidy` with `brew install tidy-html5`.)

In general, Community Group Draft Reports do not follow the same strict conventions as more mature specifications. We only archive major versions of the specification. For example, a copy of the [2021-03-17 draft report](https://github.com/WICG/webmonetization/tree/main/src/pages/specification/versions/CG-DRAFT-web-monetization-20210317.html) currently lives in [src/pages/specification/versions/](https://github.com/WICG/webmonetization/tree/main/src/pages/specification/versions).

Prettier is disabled on `src/pages/specification` as it conflicts with the code format style used by W3C specifications. There is [no way](https://github.com/prettier/prettier/issues/5246) to configure Prettier to follow the [W3C recommendation](https://github.com/validator/validator/wiki/Markup-%C2%BB-Void-elements) of not using trailing slashes on void elements.
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ You can read the [docs](https://webmonetization.org/docs/), or read the proposed

The Web Monetization website is built with [Starlight](https://starlight.astro.build/), a documentation framework based on [Astro](https://astro.build/).

* [Get Set Up](#get-set-up)
* [Content](#content)
* [Localization/Internationalization](#localizationinternationalization)
* [Reviews and Approvals](#reviews-and-approvals)
- [Get Set Up](#get-set-up)
- [Content](#content)
- [Localization/Internationalization](#localizationinternationalization)
- [Reviews and Approvals](#reviews-and-approvals)

## Get Set Up

We use [Bun](https://bun.sh/) in this repository, but you could theoretically use the package manager of your choice.
We use [Bun](https://bun.sh/) in this repository, but you could theoretically use the package manager of your choice.

### Install Bun

Expand Down Expand Up @@ -46,6 +46,10 @@ All commands are run from the root of the project, from a terminal:

You can substitute the bun commands with your chosen package manager's commands.

## Specification Development

Please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md#specification-development).

## Content

Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
Expand All @@ -60,11 +64,11 @@ The `docs.mdx` file in the root of the `content/docs` folder is essentially the

### Editing content

* [Static image assets](#static-image-assets)
* [Components](#components)
* [Edit existing doc](#edit-existing-doc)
* [Add a new doc](#add-a-new-doc)
* [Add a custom page](#add-a-custom-page)
- [Static image assets](#static-image-assets)
- [Components](#components)
- [Edit existing doc](#edit-existing-doc)
- [Add a new doc](#add-a-new-doc)
- [Add a custom page](#add-a-custom-page)

#### Static image assets

Expand All @@ -82,10 +86,10 @@ Static image assets should be placed in the `public/img/docs` directory. When re

Some 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.

The `BrowserCompat` and `Specification` components are specific to Web Monetization.
The `BrowserCompat` and `Specification` components are specific to Web Monetization.

* `BrowserCompat` generates a compatibility table based on the browser compatibility data passed into it. Additional information can be found [here](https://interledger.tech/webm/browsercompat).
* `Specification` displays a link to the relevant section of the Web Monetization specification in a table. Additional information can be found [here](https://interledger.tech/webm/specification).
- `BrowserCompat` generates a compatibility table based on the browser compatibility data passed into it. Additional information can be found [here](https://interledger.tech/webm/browsercompat).
- `Specification` displays a link to the relevant section of the Web Monetization specification in a table. Additional information can be found [here](https://interledger.tech/webm/specification).

Documentation on how to import and use shared components is available on https://interledger.tech/. If you are using multiple shared components on the same page, you can import them like so:

Expand Down Expand Up @@ -143,7 +147,7 @@ Refer to the Astro documentation on [pages](https://docs.astro.build/en/core-con

Starlight 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.

If 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).
If 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).

Translated content should be in its respective language folder within `/src/content/docs/`. English content is located within `/src/content/docs/docs`. Content in Español is located within `src/content/docs/es`. Create the language folder if it doesn't exist.

Expand All @@ -157,4 +161,4 @@ After a translation is provided, it must be reviewed by an additional contributo

## Reviews and Approvals

After 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.
After 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.

0 comments on commit 731eb3b

Please sign in to comment.