From de15f164d9a878d037c6a883a37657008041f933 Mon Sep 17 00:00:00 2001 From: Stacey Gammon Date: Tue, 8 Dec 2020 15:12:07 -0500 Subject: [PATCH] Convert a README to mdx to get it slurped up by the new docs system (#84834) * Convert readme to mdx so it can get slurped into the new docs system * Adjust plugin list doc generation so it accounts for mdx readmes * fix eslint of discover_plugin file * Fix link to readme in plugin list Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- docs/developer/plugin-list.asciidoc | 2 +- .../kbn-dev-utils/src/plugin_list/discover_plugins.ts | 4 +++- src/dev/precommit_hook/casing_check_config.js | 1 + src/plugins/data/{README.md => README.mdx} | 10 ++++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) rename src/plugins/data/{README.md => README.mdx} (97%) diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index e515abee6014c..cc268de3a4610 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -47,7 +47,7 @@ as uiSettings within the code. - Adds a dashboard embeddable that can be used in other applications. -|{kib-repo}blob/{branch}/src/plugins/data/README.md[data] +|{kib-repo}blob/{branch}/src/plugins/data/README.mdx[data] |The data plugin provides common data access services, such as search and query, for solutions and application developers. diff --git a/packages/kbn-dev-utils/src/plugin_list/discover_plugins.ts b/packages/kbn-dev-utils/src/plugin_list/discover_plugins.ts index 9782067e61343..30aaca6cfb7d7 100644 --- a/packages/kbn-dev-utils/src/plugin_list/discover_plugins.ts +++ b/packages/kbn-dev-utils/src/plugin_list/discover_plugins.ts @@ -38,7 +38,9 @@ export interface Plugin { export type Plugins = Plugin[]; const getReadmeName = (directory: string) => - Fs.readdirSync(directory).find((name) => name.toLowerCase() === 'readme.md'); + Fs.readdirSync(directory).find( + (name) => name.toLowerCase() === 'readme.md' || name.toLowerCase() === 'readme.mdx' + ); const getReadmeAsciidocName = (directory: string) => Fs.readdirSync(directory).find((name) => name.toLowerCase() === 'readme.asciidoc'); diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index 8448d20aa2fc8..69a657357a803 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -30,6 +30,7 @@ export const IGNORE_FILE_GLOBS = [ 'docs/**/*', '**/bin/**/*', '**/+([A-Z_]).md', + '**/+([A-Z_]).mdx', '**/+([A-Z_]).asciidoc', '**/LICENSE', '**/*.txt', diff --git a/src/plugins/data/README.md b/src/plugins/data/README.mdx similarity index 97% rename from src/plugins/data/README.md rename to src/plugins/data/README.mdx index 0c3d8d4072aae..13bb8443ffef6 100644 --- a/src/plugins/data/README.md +++ b/src/plugins/data/README.mdx @@ -1,3 +1,13 @@ +--- +id: kibDataPlugin +slug: /kibana-dev-guide/services/data-plugin +title: Data services +image: https://source.unsplash.com/400x175/?Search +summary: The data plugin contains services for searching, querying and filtering. +date: 2020-12-02 +tags: ['kibana','dev', 'contributor', 'api docs'] +--- + # data The data plugin provides common data access services, such as `search` and `query`, for solutions and application developers.