Skip to content

Commit

Permalink
Convert a README to mdx to get it slurped up by the new docs system (#…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
stacey-gammon and kibanamachine authored Dec 8, 2020
1 parent e74cb40 commit de15f16
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion packages/kbn-dev-utils/src/plugin_list/discover_plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions src/dev/precommit_hook/casing_check_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const IGNORE_FILE_GLOBS = [
'docs/**/*',
'**/bin/**/*',
'**/+([A-Z_]).md',
'**/+([A-Z_]).mdx',
'**/+([A-Z_]).asciidoc',
'**/LICENSE',
'**/*.txt',
Expand Down
10 changes: 10 additions & 0 deletions src/plugins/data/README.md → src/plugins/data/README.mdx
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit de15f16

Please sign in to comment.