From 1fefcd2e4c8f0fb25eba25f719e059afae514598 Mon Sep 17 00:00:00 2001 From: Timur Osmanov <timurosm@yandex.ru> Date: Wed, 2 Oct 2024 09:55:31 +0300 Subject: [PATCH] update: README --- README.md | 6 ++++++ README_ru.md | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b90c8ec..55688c9 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ preprocessors: - j2 aliases: ... + includes_map: true ``` `cache_dir` @@ -79,6 +80,11 @@ Default `true`. Note that in the second example the default revision (`develop`) will be overridden with the custom one (`master`). +`includes_map` +: Enables generation of the `includes_map.json` file containing information about files inserted using the includes preprocessor. + + From this file, third-party services can receive information about the presence of inclusions in files, for example, to check links using a linter. + ## Usage The preprocessor allows two syntax variants for include statements. diff --git a/README_ru.md b/README_ru.md index ddede50..dd652e2 100644 --- a/README_ru.md +++ b/README_ru.md @@ -1,4 +1,4 @@ -[![](https://img.shields.io/pypi/v/foliantcontrib.includes.svg)](https://pypi.org/project/foliantcontrib.includes/) [![](https://img.shields.io/github/v/tag/foliant-docs/foliantcontrib.includes.svg?label=GitHub)](https://github.com/foliant-docs/foliantcontrib.includes) +[![](https://img.shields.io/pypi/v/foliantcontrib.includes.svg)](https://pypi.org/project/foliantcontrib.includes/) [![](https://img.shields.io/github/v/tag/foliant-docs/foliantcontrib.includes.svg?label=GitHub)](https://github.com/foliant-docs/foliantcontrib.includes) [![Tests](https://github.com/foliant-docs/foliantcontrib.includes/actions/workflows/python-test.yml/badge.svg)](https://github.com/foliant-docs/foliantcontrib.includes/actions/workflows/python-test.yml) # Препроцессор Includes для Foliant @@ -34,6 +34,7 @@ preprocessors: - j2 aliases: ... + includes_map: true ``` `cache_dir` @@ -64,6 +65,10 @@ preprocessors: `aliases` : Сопоставление псевдонимов с URL-адресами репозитория Git. После определения этого параметра псевдоним может использоваться для ссылки на репозиторий вместо его полного URL-адреса. +`includes_map` +: Включает генерацию файла `includes_map.json`, содержащего информацию о файлах, вставленных с помощью препроцессора includes. + Из этого файла сторонние сервисы могут получать информацию о наличии текста вставленного в файл с помощью препроцессора, например, для проверки ссылок с помощью линтера. + >**Внимание!** > > Псевдонимы доступны только в рамках устаревшего синтаксиса инструкций include (см. ниже)