wails/website
Anton Gilgur 7b8355a385
[v2] docs(menu): add imports and complete the example (post merge conflict) (#4742)
* [v2] docs(menu): add imports and complete the example (post merge conflict)

This partially redoes commit cb3305a2fc, as a merge conflict resolution seemed to have accidentally removed a large portion of the changes

- the example was missing imports, which [confused a user](https://stackoverflow.com/q/79827619/3431180), particularly due to the `rt` import alias
  - plus there are a good number of imports too, which this makes explicit
  - also give this file the title `menu.go` for clarity / explicitness, particularly to differentiate from the `NewApp` / `app.go` scaffold
- also handle the error at the end similar to [existing examples](4c464b3092/website/docs/guides/application-development.mdx (L54))

* add changelog entry per PR template
2025-12-01 19:16:00 +11:00
..
.vscode feat(website): repair document content (#1775) 2022-08-22 19:59:28 +10:00
blog Blog Post 2025-03-16 14:01:11 +11:00
docs [v2] docs(menu): add imports and complete the example (post merge conflict) (#4742) 2025-12-01 19:16:00 +11:00
i18n docs: fix typo of the window hiding method to "WindowHide" in the zh-Hans documentation (#4655) 2025-11-29 13:49:43 +11:00
src [v2] docs(menu): add imports and complete the example (post merge conflict) (#4742) 2025-12-01 19:16:00 +11:00
static chore: update sponsors.svg (#4740) 2025-11-30 12:39:10 +11:00
versioned_docs v2.11.0 2025-11-08 13:36:09 +11:00
versioned_sidebars v2.11.0 2025-11-08 13:36:09 +11:00
.gitattributes [Github] Exclude /website from language stats (#2927) 2023-09-21 05:48:19 +10:00
.gitignore fix: fix website build and add taskfile (#2577) 2023-04-12 21:36:01 +10:00
.nvmrc chore: optimize website building process (#2601) 2023-04-17 20:54:06 +10:00
.prettierignore chore: add Prettier as format tool (#2689) 2023-05-30 07:40:54 +10:00
babel.config.js v2.0.0 2022-09-22 11:00:57 +10:00
bun.lockb Update docs build configs 2025-11-08 13:10:53 +11:00
crowdin.yml feat(website): update the Crowdin branch (#2688) 2023-05-27 12:51:43 +10:00
docusaurus.config.js [Snyk] Fix for 11 vulnerabilities (#4695) 2025-11-09 10:07:19 +11:00
package-lock.json [Snyk] Fix for 11 vulnerabilities (#4695) 2025-11-09 10:07:19 +11:00
package.json [Snyk] Fix for 11 vulnerabilities (#4695) 2025-11-09 10:07:19 +11:00
pnpm-lock.yaml v2.11.0 2025-11-08 13:36:09 +11:00
prettier.config.js chore: add Prettier as format tool (#2689) 2023-05-30 07:40:54 +10:00
README.md v2.0.0 2022-09-22 11:00:57 +10:00
sidebars.js fix(website): fix link (#1785) 2022-08-24 06:22:48 +10:00
Taskfile.yml Fix translations 2024-06-16 13:10:56 +10:00
versions.json v2.11.0 2025-11-08 13:36:09 +11:00

Website

This website is built using Docusaurus 2, a modern static website generator.

Installation

$ npm

Local Development

$ npm run start

Other languages:

npm run start -- --locale <language>

language - The language code configured in the i18n field in the docusaurus.config.js file.

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

Translate

After the English source file is updated, run the following command to submit the source file to Crowdin:

npm run crowdin push -- -b <branch>

branch - Branch name in crowdin project

Run the following command to pull the translated files in crowdin to the local:

npm run crowdin pull -- -b <branch> -l <languageCode>

languageCode - Note that this refers to the language code in the crowdin project.

The recommended practice is to update the English source file locally, then translate the file in crowdin, and finally pull the translated file to the local.

Build

$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.