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
Node.js 18 or later (required to run the CLI).
A text editor, for example Visual Studio Code.
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
Open Yandex Wiki and sign in.
Press F12 to open the developer console.
Go to the Network → Fetch/XHR tab.
Select any article in the left panel. The
getPageDetailsrequest appears in the console.Right-click the request → Copy → Copy as fetch (Node.js).
Save the copied code to a text file.
Step 3. Configure Gramax CLI
Create a
gramax.config.yamlfile in your working directory.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"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"Save the file.
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 thegramax.config.yamlfile.--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-catalogfolder 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.