npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@diplodoc/cli

v5.54.2

Published

Make documentation using yfm-docs in Markdown and HTML formats

Downloads

20,304

Readme

english | русский


NPM version Quality Gate Status Coverage Maintainability Rating Reliability Rating Security Rating

yfm-docs

Yfm-docs позволяет собрать полноценный документационный проект: с навигацией, внутренними переходами и полной поддержкой Yandex Flavored Markdown (YFM).

Пример отображения страницы документации

Документация

ydocs.tech

Требования

Node 22+

Использование

npm i @diplodoc/cli -g
npm run start -- -i ./input-folder -o ./ouput-folder -v "{\"name\":\"Alice\"}"

yfm init

Инициализация нового проекта документации Diplodoc.

Использование

yfm init [options]

Запуск без флагов в терминале запускает интерактивный визард. Передайте --skip-interactive чтобы использовать флаги и дефолтные значения.

Опции

| Опция | По умолчанию | Описание | | ------------------------- | ------------------- | --------------------------------------------- | | -o, --output <path> | . | Директория для создания проекта | | --name <string> | basename директории | Название проекта | | --langs <string> | en | Языки через запятую, например en,ru | | --default-lang <string> | первый из --langs | Язык по умолчанию | | --template <string> | minimal | minimal или full | | --header | true | Навигационная шапка в toc.yaml | | --force | false | Перезаписать существующую директорию | | --dry-run | false | Показать что будет создано, без записи файлов | | --skip-interactive | false | Пропустить визард |

Создаваемые файлы

minimal

<output>/
├── .yfm
├── toc.yaml
└── index.md

full — дополнительно создаёт presets.yaml, pc.yaml и расширенный .yfm с конфигурацией pdf, search, vcs, authors.

Для многоязычных проектов (--langs en,ru) контент размещается в поддиректориях по языку:

<output>/
├── .yfm
├── presets.yaml
├── en/
│   ├── toc.yaml
│   └── index.md
└── ru/
    ├── toc.yaml
    └── index.md

yfm content

Обрабатывает один Markdown-файл и выводит результат в stdout (или пишет в файл). В отличие от yfm build, не обходит весь проект и не собирает целую страницу — для html отдаётся только контентный фрагмент (без toc, шапки и обвязки страницы).

Использование

# self-contained markdown в stdout
yfm content -i ./page.md -f md

# html-фрагмент в файл
yfm content -i ./page.md -f html -o ./page.html

Результат в stdout обрамляется маркерами-разделителями, чтобы его можно было отделить от сопутствующего диагностического вывода:

<<<<<< YFM CONTENT START >>>>>>
...контент...
<<<<<< YFM CONTENT END >>>>>>

Предупреждения и ошибки идут в stderr; при любой ошибке сборки процесс завершается с ненулевым кодом. При использовании -o в файл пишется «сырой» контент (без маркеров).

Флаг --raw выводит в stdout только контент — без маркеров-разделителей и без баннеров фреймворка (строка версии, таймер сборки, баннер завершения). Удобно, когда результат нужно направить напрямую в другой инструмент или файл:

yfm content -i ./page.md -f md --raw > page.md

Вместе с -o флаг --raw ничего не меняет (в файл всегда пишется «сырой» контент).

Корень проекта

Пресеты (presets.yaml), инклуды и переменные резолвятся относительно корня проекта:

  • по умолчанию корень — текущая рабочая директория;
  • передайте -c, --config <path> с путём к .yfm — его директория станет корнем.

Опции

| Опция | По умолчанию | Описание | | ---------------------------------------- | ------------ | ---------------------------------------------------------- | | -i, --input <file> | — | Путь к Markdown-файлу (обязателен) | | -o, --output <file> | stdout | Записать результат в файл вместо stdout | | -f, --output-format <md\|html> | html | Формат вывода | | -w, --watch | false | Пересборка при изменении файла, его инклудов и пресетов | | --raw | false | Выводить в stdout только контент (без маркеров и баннеров) | | -c, --config <path> | .yfm | Конфиг; его директория становится корнем проекта | | --vars-preset <name> | default | Применяемый пресет переменных | | -v, --vars <json> | — | Переменные (JSON), переопределяющие пресеты | | --allow-html / --no-allow-html | true | Разрешить сырой HTML в Markdown | | --sanitize-html / --no-sanitize-html | true | Санитизировать результирующий HTML | | --id-generator <strategy> | random | Стратегия id элементов: random, deterministic и т.д. | | -s, --strict | false | Ненулевой код выхода при наличии предупреждений |

Исходники

Подготовка

Необходимо добавить .env файл в рут репозитория с данными ниже:

GITHUB_OWNER=
GITHUB_REPO= # docs
GITHUB_TOKEN= # personal access token
GITHUB_BASE_URL= # for ex: https://api.github.com
VCS_CONNECTOR_TYPE= # github

или обновить .yfm файл в docs репозитории:

connector:
    type:
    github:
        endpoint:
        token:
        owner:
        repo:

Сборка из исходников

cd cli
npm ci && npm run build

License

MIT