-
Notifications
You must be signed in to change notification settings - Fork 36
Docsup 116404.diplodoc single source #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docsup 116404.diplodoc single source #202
Conversation
❌ Documentation buildRevision build failed Build logsErrors (1)❌ ru/guides/single-source/includes.md: Error: ENOENT: no such file or directory, open '/ru/guides/_includes/file.md' Warnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
ru/guides/single-source/ei.md
Outdated
|
|
||
| Единый источник упрощает обновление проекта и снижает количество ошибок. Повторяющийся текст находится в одном месте, поэтому при обновлении не нужно искать и править все его вхождения. | ||
|
|
||
| {% cut "Примеры" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
давай расширим описание примеров, чтобы и бабушке Воложа стало понятно. Можно переделать в целый небольшой подраздел.
ты собрала хорошие примеры, но нужно объяснить читателям, которые никогда об этом не слышали, как это щупается и работает.
| {% endcut %} | ||
|
|
||
|
|
||
| ## Методы работы с единым источником {#methods} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нужны живые примеры на каждое использование. если будут сложности с поиском, спроси коллег, а уж потом призывай меня)
ru/guides/single-source/ei.md
Outdated
|
|
||
| * Внутри проекта с профилированием можно дополнительно использовать инклюды или пресеты переменных, поэтому способы можно комбинировать. | ||
|
|
||
| * Если из одного документа-источника необходимо опубликовать несколько документов на разных доменах, то нужно настроить конфигурационные файлы для [профилирования](./profiling.md#configs). В случае переиспользования возможна публикация нескольких документов только на одном домене с разными url. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Если из одного документа-источника необходимо опубликовать несколько документов на разных доменах, то нужно настроить конфигурационные файлы для [профилирования](./profiling.md#configs). В случае переиспользования возможна публикация нескольких документов только на одном домене с разными url. | |
| * Если из одного документа-источника необходимо опубликовать несколько документов на разных доменах, то нужно настроить конфигурационные файлы для [профилирования](./profiling.md#configs). В случае переиспользования возможна публикация нескольких документов только на одном домене с разными URL. |
для корректности
ru/guides/single-source/profiling.md
Outdated
| {% note info %} | ||
| Если для проекта необходима автоматическая выкладка в прод, ее можно будет настроить только для одного из документов проекта, для остальных нужно будет делать ручную выкладку. Подробнее об этом можно почитать в [разделе Выкладка через Арканум](https://docs.yandex-team.ru/docstools/deploy/release#vykladka-cherez-arkanum). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
диплодоком пользуются не только в Яндексе, но и внешние клиенты) и эта Справка как раз для них) поэтому всю внутрянку типа такого вычищаем
ru/guides/single-source/profiling.md
Outdated
| В поле `varsPreset` укажите имя пресета из [шага 1](#prepare-conditions). | ||
|
|
||
|
|
||
| ### Файл `ya.make` {#yamake} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
внешний диплодок не использует ya.make: см. структуру. так что чистим и его упоминания тоже
ru/guides/single-source/profiling.md
Outdated
| [//]: # (Для файла `ya.make`, который находится в папке с документом-источником, указывать макрос `DOCS_DIR` не нужно.) | ||
|
|
||
|
|
||
| ### Файл `a.yaml` {#a-yaml} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
см. коммент про ya.make.
| 1. В директорию с документом, собираемым из единого источника, добавьте файл оглавления `toc.yaml`. Включите в него файл оглавления из директории с документом-источником. | ||
| 1. В директорию с документом, собираемым из единого источника, добавьте [файл `presets.yaml`](presets.md) и все страницы с уникальным для этого документа контентом. | ||
|
|
||
| Пример проекта в Аркадии — справка [Яндекс Заданий](https://a.yandex-team.ru/arcadia/docs/support/tasks). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вычищаем
ru/guides/single-source/build.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вычищаем
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
ru/guides/single-source/build.md
Outdated
| @@ -0,0 +1,37 @@ | |||
| # Локальная сборка YFM с переиспользованием (для КПБ) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а КПБ в заголовке на кой чёрт осталось?)
ru/guides/single-source/profiling.md
Outdated
| │ └── toc.yaml | ||
| ├── document_name_1 # Папка собираемого документа, например android, windows или tld-com | ||
| │ ├── .yfm | ||
| │ ├── a.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
у внешних клиентов не будет a.yaml в проекте
ru/guides/single-source/ei.md
Outdated
|
|
||
| * [Справка Яндекс Музыки](https://yandex.ru/support/music/ru/new-template/gettingstart) | ||
|
|
||
| После установки Яндекс Музыки пользователь может обратиться к справке, чтобы разобраться с работой сервиса. Справка содержит понятные инструкции, адаптированные под конкретную платформу. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
общие слова. нужна конкретика, как в этом случае работает единый источник
ru/guides/single-source/ei.md
Outdated
|
|
||
| * [Справка Кинопоиска](https://yandex.ru/support/kinopoisk/ru/authorization/get-started) | ||
|
|
||
| Если пользователь сталкивается с трудностями при авторизации в Кинопоиске, он может обратиться к справке. Там он найдет пошаговые инструкции, объясняющие все необходимые действия. При этом пользователи из разных стран или с других платформ увидят версии справки, учитывающие языковые и интерфейсные особенности. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
из полезного про ЕИ здесь только последнее предложение. нужно развить эту мысль и показать примеры: в этом случае так, а в этом случае — вот так.
|
|
||
| Способ применяется, если общего контента больше, чем уникального. | ||
|
|
||
| {% cut "Пример" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вот это уже хороший пример!
ru/guides/single-source/ei.md
Outdated
|
|
||
| {% cut "Пример" %} | ||
|
|
||
| В [справке Яндекс Музыки](https://yandex.ru/support/music/ru/) некоторые разделы содержат повторяющуюся информацию, например, о [способах авторизации](https://yandex.ru/support/music/ru/new-template/gettingstart). Такие блоки оформляются в виде инклюдов и включаются в нужные места текста. При изменении способов авторизации достаточно отредактировать только один файл. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
«нужные места текста» нужно расширить — привести примеры, где повторяется текст через инклюд
ru/guides/single-source/ei.md
Outdated
|
|
||
| {% cut "Пример" %} | ||
|
|
||
| В [справке Кинопоиска](https://yandex.ru/support/kinopoisk/ru/) в разделе [«Покупка и аренда фильмов»](https://yandex.ru/support/kinopoisk/ru/online/content/buing-renting) могут использоваться переменные для методов оплаты, которые зависят от региона. В пресетах задаются разные значения для переменных `метод_оплаты` в зависимости от страны пользователя. При генерации версии справки для конкретного региона в текст подставляются соответствующие значения, что позволяет предоставить пользователям информацию, релевантную их местоположению и доступным сервисам. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тоже нужен пример, куда читатель может ткнуться носом и воочию увидеть разницу
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
ru/toc.yaml
Outdated
| href: guides/single-source/includes.md | ||
| - name: Вставки оглавлений | ||
| href: guides/single-source/toc_includes.md | ||
| - name: Локальная сборка YFM с переиспользованием (для КПБ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
здесь КПБ остался
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
ru/guides/single-source/index.md
Outdated
|
|
||
| ## Методы работы с единым источником {#methods} | ||
|
|
||
| [**Профилирование**](./profiling.md) используется для формирования нескольких похожих документов из одного документа-источника. Текст размечается с помощью [условных операторов](https://diplodoc.com/docs/ru/syntax/vars#conditions) или [переменных](https://diplodoc.com/docs/ru/syntax/vars). При сборке в каждый выходной документ подставляются только нужные фрагменты текста. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
до других статей делай относительные ссылки вместо абсолютных: ../../syntax/vars.md#conditions
✅ Documentation buildRevision built successfully Build logsWarnings (14) |
No description provided.