Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
build:
name: Build Docusaurus
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
Expand Down
48 changes: 44 additions & 4 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Website docusaurus v2
# Verdaccio Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
The official Verdaccio documentation website, built with [Docusaurus 2](https://docusaurus.io/) — a modern static website generator.

## Requirements

- [Node.js](https://nodejs.org/) v18+
- [pnpm](https://pnpm.io/)

## Installation

Expand All @@ -14,12 +19,47 @@ pnpm install
pnpm start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Starts a local development server and opens a browser window. Most changes are reflected live without restarting the server.

## Build

```console
pnpm build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
Generates static content into the `build` directory, which can be served by any static hosting service.

## Translations

This site supports multiple languages via [Crowdin](https://crowdin.com/project/verdaccio). To contribute a translation, click **Help Us Translate** in the language switcher on the site, or visit the Crowdin project directly.

### Language filtering

Not all languages appear in the site navigation. A locale is included only when its **translation progress exceeds the minimum threshold** (currently `80%`). Languages that fall below this threshold are excluded at build time, and a warning is printed to the console:

```
[i18n] Locale "de" excluded — progress 72% is below threshold 80%
```

Locales with no matching entry in the translations data are also excluded:

```
[i18n] Locale "xx" excluded — not found in translations data
```

The active locales for the current build are logged on startup:

```
[i18n] Active locales: [ 'en', 'de-DE', 'fr-FR', ... ]
```

### Adding or updating a locale

1. Open `docusaurus.config.js` and add the locale code to the `filterByProgress` call.
2. Add a corresponding entry in `LOCALE_TO_CROWDIN` if the Crowdin key differs from the Docusaurus locale code (e.g. `'de-DE' → 'de'`).
3. Add a `localeConfigs` entry using the `localeLabel` helper so the language switcher shows the current progress percentage.
4. Translate the content on [Crowdin](https://crowdin.com/project/verdaccio) until the locale clears the threshold.

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md) for general contribution guidelines.
Loading