Yandex Wiki

You can export articles from Yandex Wiki to Markdown, then publish the catalogs to your Git storage and use them in Gramax.

Gramax preserves the hierarchy, images, diagrams, and most of the formatting.

What you need

  1. Node.js 18 or later (required to run the CLI).

  2. A text editor, for example Visual Studio Code.

  3. A terminal.

Step 1. Install Gramax CLI

You can use Gramax CLI in two ways: without installation via npx or with a global installation.

  • Without installation: run npx gramax-cli <command> [options].

  • Global installation: for regular use, run npm install -g gramax-cli.

After that, CLI commands are available from any folder.

Step 2. Get data from Yandex Wiki

  1. Open Yandex Wiki and sign in.

  2. Press F12 to open the developer console.

  3. Go to the Network → Fetch/XHR tab.

  4. Select any article in the left panel. The getPageDetails request appears in the console.

  5. Right-click the request → Copy → Copy as fetch (Node.js).

  6. Save the copied code to a text file.

Step 3. Configure Gramax CLI

  1. Create a gramax.config.yaml file in your working directory.

  2. Paste the configuration template into it.

    import: yandex: headers: "x-csrf-token": "your-csrf-token" "x-org-id": "your-org-id" cookie: "your-cookie-string" "x-collab-org-id": "optional-collab-org-id"
  3. Fill in the template with the data you copied from Yandex Wiki in step 2. Example of a filled-in template:

    import: yandex: headers: "x-csrf-token": "e8399826638e73245k0f1cfe5a944b87683bbs10:1754349881" "x-org-id": "1331068" cookie: "yandexuid=8626904001695300517; yuidss=8626904001695300517; gdpr=0; _ym_uid=1695303700525969138; yandex_login=name@name.ru;...924b99683bbb10%33878179541" "x-collab-org-id": "cf3c7652-ae27-455f-a126-9de4f12cegaa"
  4. Save the file.

Note

The x-collab-org-id parameter is optional. If you don't have this value, just omit the parameter.

Step 4: Run

Open the console and run the command:

npx gramax-cli import yandex-wiki --destination <path> --config <path> [--raw]

Where:

  • --destination, -d — path to the folder where articles from Yandex Wiki are exported.

  • --config, -c — path to the folder that contains the gramax.config.yaml file.

  • --raw, -r — disables converting Markdown to the Gramax format. If set, articles are exported in Yandex Wiki markup. If not set, in Gramax markup.

Result

  • A yandex-wiki-catalog folder is created in the specified directory.

  • Each article is saved as an MD file.

  • Images and diagrams are exported as separate files next to their articles.