Skip to content

Commit

Permalink
docs: switch to orama
Browse files Browse the repository at this point in the history
  • Loading branch information
ilteoood authored and longlho committed May 4, 2024
1 parent 008b3c7 commit b0a6d34
Show file tree
Hide file tree
Showing 8 changed files with 2,556 additions and 1,629 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Pull requests are very welcome, but should be within the scope of the project, a
- [`bazel`](https://bazel.build/)
- [`docker`](https://www.docker.com/)

You can build & test with `pnpm`:
You can build & test with `pnpm`. At the moment version >= 9 is not supported:

```sh
pnpm i && pnpm t
Expand Down
4,149 changes: 2,540 additions & 1,609 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion website/docs/getting-started/message-declaration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ While you can declare your messages using only `id`s, we highly recommend declar
3. Text styling is also dependent on the message itself. Things like truncation, capitalization... certainly affect the messages themselves.
4. Better integrations with toolchains. Most toolchains cannot verify cross-file references to validate syntax/usage.

At a high level, formatjs messages use [ICU Syntax](../core-concepts/icu-syntax.md) with a couple of enhancements common in other message format such as [Fluent](https://github.com/projectfluent/fluent.js/). This section focuses on the actual supported ways of calling `formatjs` APIs so messages can be extracted.
At a high level, formatjs messages use [ICU Syntax](../core-concepts/icu-syntax.mdx) with a couple of enhancements common in other message format such as [Fluent](https://github.com/projectfluent/fluent.js/). This section focuses on the actual supported ways of calling `formatjs` APIs so messages can be extracted.

## Using imperative API `intl.formatMessage`

Expand Down
4 changes: 2 additions & 2 deletions website/docs/intl.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ intl.formatDisplayName('UN', {type: 'region'})

### Message Syntax

String/Message formatting is a paramount feature of React Intl and it builds on [ICU Message Formatting](https://unicode-org.github.io/icu/userguide/format_parse/messages) by using the [ICU Message Syntax](./core-concepts/icu-syntax.md). This message syntax allows for simple to complex messages to be defined, translated, and then formatted at runtime.
String/Message formatting is a paramount feature of React Intl and it builds on [ICU Message Formatting](https://unicode-org.github.io/icu/userguide/format_parse/messages) by using the [ICU Message Syntax](./core-concepts/icu-syntax.mdx). This message syntax allows for simple to complex messages to be defined, translated, and then formatted at runtime.

**Simple Message:**

Expand All @@ -407,7 +407,7 @@ Hello, {name}, you have {itemCount, plural,
}.
```

**See:** The [Message Syntax Guide](./core-concepts/icu-syntax.md).
**See:** The [Message Syntax Guide](./core-concepts/icu-syntax.mdx).

### Message Descriptor

Expand Down
4 changes: 2 additions & 2 deletions website/docs/react-intl/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ intl.formatDisplayName('UN', {type: 'region'})

### Message Syntax

String/Message formatting is a paramount feature of React Intl and it builds on [ICU Message Formatting](https://unicode-org.github.io/icu/userguide/format_parse/messages) by using the [ICU Message Syntax](../core-concepts/icu-syntax.md). This message syntax allows for simple to complex messages to be defined, translated, and then formatted at runtime.
String/Message formatting is a paramount feature of React Intl and it builds on [ICU Message Formatting](https://unicode-org.github.io/icu/userguide/format_parse/messages) by using the [ICU Message Syntax](../core-concepts/icu-syntax.mdx). This message syntax allows for simple to complex messages to be defined, translated, and then formatted at runtime.

**Simple Message:**

Expand All @@ -487,7 +487,7 @@ Hello, {name}, you have {itemCount, plural,
}.
```

**See:** The [Message Syntax Guide](../core-concepts/icu-syntax.md).
**See:** The [Message Syntax Guide](../core-concepts/icu-syntax.mdx).

### Message Descriptor

Expand Down
4 changes: 2 additions & 2 deletions website/docs/react-intl/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ props: MessageDescriptor &

### Message Syntax

String/Message formatting is a paramount feature of React Intl and it builds on [ICU Message Formatting](https://unicode-org.github.io/icu/userguide/format_parse/messages) by using the [ICU Message Syntax](../core-concepts/icu-syntax.md). This message syntax allows for simple to complex messages to be defined, translated, and then formatted at runtime.
String/Message formatting is a paramount feature of React Intl and it builds on [ICU Message Formatting](https://unicode-org.github.io/icu/userguide/format_parse/messages) by using the [ICU Message Syntax](../core-concepts/icu-syntax.mdx). This message syntax allows for simple to complex messages to be defined, translated, and then formatted at runtime.

**Simple Message:**

Expand All @@ -587,7 +587,7 @@ Hello, {name}, you have {itemCount, plural,
}.
```

**See:** The [Message Syntax Guide](../core-concepts/icu-syntax.md).
**See:** The [Message Syntax Guide](../core-concepts/icu-syntax.mdx).

### Message Descriptor

Expand Down
6 changes: 1 addition & 5 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ export default {
organizationName: 'formatjs', // Usually your GitHub org/user name.
projectName: 'formatjs.github.io', // Usually your repo name.
themes: ['@docusaurus/theme-live-codeblock'],
plugins: ['@orama/plugin-docusaurus-v3'],
themeConfig: {
prism: {
additionalLanguages: ['markup'],
},
algolia: {
appId: '4V7OJU17Z9',
apiKey: '64ffba7fb3e3ee96182a32b6bf44591f',
indexName: 'formatjs',
},
navbar: {
title: 'Format.JS',
logo: {
Expand Down
14 changes: 7 additions & 7 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
]
},
"devDependencies": {
"@algolia/client-search": "4",
"@docusaurus/core": "3",
"@docusaurus/plugin-google-analytics": "3",
"@docusaurus/preset-classic": "3",
"@docusaurus/theme-common": "3",
"@docusaurus/theme-live-codeblock": "3",
"@docusaurus/types": "3",
"@docusaurus/core": "3.3.2",
"@docusaurus/plugin-google-analytics": "3.3.2",
"@docusaurus/preset-classic": "3.3.2",
"@docusaurus/theme-common": "3.3.2",
"@docusaurus/theme-live-codeblock": "3.3.2",
"@docusaurus/types": "3.3.2",
"@formatjs/icu-messageformat-parser": "workspace:*",
"@mdx-js/react": "3",
"@orama/plugin-docusaurus-v3": "2.0.17",
"classnames": "2",
"http-server": "14",
"intl-messageformat": "workspace:*",
Expand Down

0 comments on commit b0a6d34

Please sign in to comment.