- Clone the repository
- Run
yarn
to install all the required packages. - Run
yarn dev
to start server for development mode.
Refer this PR to change the default version for the version selector
on the top navigation bar
To add content to the docs use markdown files. Some custom markdoc tags are listed below for adding content with predefined styling.
Similar to the normal react components, custom tags can be used as follows Example: Here's how to use tag named 'exampleTag' with some attributes
{% exampleTag attributeName="value" %} <!-- starting tag with attributes -->
This is content inside tag.
{% /exampleTag %} <!-- closing tag -->
Note that for passing the values in string type attribute, always use Double Quotes ("
) and not Single Quotes ('
) as it's done in the above example
Here are the custom markdoc tags to use for desired functionalities.
- Modified Default Nodes
- Common Tags
- Tags for Code Preview Functionality
- Tags for Showing Step by Step Information
- APIs & SDKs page tags
- Inline Callout
- Tile
The fence node used for multi line code display with indentation has following additional attributes apart from the default markdown attributes.
-
srNumber (type - String) The code number, to highlight the code when the codeInfo container of the same srNumber is selected.
-
isCodeBlock (type - Boolean) To determine if the code is used inside a 'codeBlock'. Must set true if used inside a 'codeBlock' tag without srNumber. This is essential for the copy to clipboard functionality to work with accurate indentations for the code inside the 'codeBlock'.
The partial tag helps in reducing the repetition in the content. If a set of lines are being used in multiple pages, you can use this tag to prevent adding same lines in multiple files. You can also pass variables for some varying content. Learn more about that here
- Add the repeating content in a file inside "content/partials" folder. You can also add nested structure inside the "partials" folder.
Lets say you created a file named 'test.md' inside a path
content/partials/folder1/folder2
with content -
### repeating line
This is the repeating line 1
This is the repeating line 2
- Now just use the partial tag in some other file like this
# This is the parent file
{% partial file="/folder1/folder2/test.md" /%}
and some other content
And this is how the parent file will render
A tag for highlighting some part of the content.
- noteType (type - String) Mention the type of note you want to show. There are 3 types of note which differ in styling.
If no attribute is passed then the default type will be considered as "Note"
Example:
- Note
{% note noteType="Note" %} A Note {% /note %}
OR
{% note %} A Note {% /note %}
- Warning
{% note noteType="Warning" %} A Warning {% /note %}
- Tip
{% note noteType="Tip" %} A Tip {% /note %}
A tag to display specific code snippets with the selected language from the given language options.
Include code snippets for all the languages given in the languagesArray
inside the opening and closing tag with proper syntax as given in the example below.
-
title (type - String) Title to show for the language selector component.
-
languagesArray (type - Array) An array of language codes. This array will determine how many and what tabs to display for selection. Use similar 'language codes' that are used for highlighting the code in the markdown fence nodes. example: java, python, javascript, json, etc.
-
id (type - String) Id should be unique for all the 'codeWithLanguageSelector' tags within a single page.
-
theme (type - String) This is an optional argument to choose the color theme for the code block. Available options are 'gray', 'light' and 'default'
Example:
{% codeWithLanguageSelector title="The Title" id="container-1" languagesArray=["json","python","java","bash"] theme="light" %}
```json { "a": { "c": "open", "num": 5, "val": false } } ```
```python def my_function(): print("Hello world!") ```
```java public class Main { static void myMethod() { System.out.print("Hello world!") } } ```
```bash curl https://google.com -a ```
{% /codeWithLanguageSelector %}
- Default
- Light
- Gray
Tag to add some extra information in between two steps. This tag can be used inside either the codePreview
tag or the stepsContainer
tag. To use it inside above tags, add it in between two codeInfo
or step
tags respectively. More detailed examples to use extraContent
are given below, in the above mentioned tags sections.
- parentTagName (type - String) The name of the tag you are using it in. For example 'codePreview' or 'stepsContainer'
Tag to show a styled heading for connectors with the connector Icon, development stage, platform availability and feature status.
-
name (type - String) The name of the container in startCase.
-
stage (type - String) The development stage of the connector. It should be one of two values "PROD"(default value) or "BETA".
-
platform (type - String) The platform the connector is available in to. It should be one of two values "OpenMetadata"(default value) or "Collate".
-
availableFeatures (type - Array) The list of available features for the connector such as "Query Usage", "Lineage" etc.
-
unavailableFeatures (type - Array) The list of unavailable features for the connector such as "DBT", "Owners" etc
A styled card to show the links to navigate users to the connector details page with a little information about the connector.
-
name (type - String) The name of the container in startCase.
-
stage (type - String) The development stage of the connector. It should be one of two values "PROD"(default value) or "BETA".
-
href (type - String) The relative path of the connector details page.
-
platform (type - String) The platform the connector is available in to. It should be one of two values "OpenMetadata"(default value) or "Collate".
A wrapper tag to envelope the connectorInfoCard tags for a grid view.
For showing code or commands with the explanations by side use following tags:-
Its a container which will have two tags as child 'codeInfoContainer' and 'codeBlock'
Container tag for all the 'codeInfo' tags
It's a tag for which will contain explanation or information about a chuck of code. Use as many tags as many steps you want inside the 'codeInfoContainer' tag.
- srNumber (type - Number) It is the code info number and the corresponding code block number you want to highlight for the given information.
Note: srNumber is also a unique id to identify a code block. Make sure that you have srNumber values unique on a single page. That is even if multiple codePreview components are used in a page, the srNumbers should all be unique and should not repeat on a single page.
A container tag to enclose all the code chunks you will write for each steps given with 'codeInfo' tag. Make sure to maintain the same order you want 'codeInfo' tags to be associated with it.
-
fileName (type - String) This is an optional argument. Pass the name of the file in which the code given inside the
codeBlock
tag is supposed to be. -
theme (type - String) This is an optional argument to choose the color theme for the code block. Available options are 'gray', 'light' and 'default'
Please make sure to pass an argument srNumber to the code node to link with the respective codeInfo section. This will determine which code block to highlight for which codeInfo section. Here is how you can pass the argument:
```bash {% srNumber=1 %} print('hello!') ```
Example:
{% codePreview %}
{% codeInfoContainer %}
{% codeInfo srNumber=1 %} Information about 1st code chunk. {% /codeInfo %}
{% extraContent parentTagName="codePreview" %} Some extra information {% /extraContent %}
{% codeInfo srNumber=2 %} Information about 2nd code chunk {% /codeInfo %}
{% codeInfo srNumber=3 %} Information about 3rd code chunk {% /codeInfo %}
{% /codeInfoContainer %}
{% codeBlock fileName="sample.txt" %}
```bash {% srNumber=1 %} Code for first codeInfo tag ```
```bash Code without reference ```
```bash {% srNumber=2 %} Code for second codeInfo tag with 3 lines print('Hello world!') ```
```bash {% srNumber=3 %} Code for third codeInfo tag with 4 lines print('Hello There') print('This is block 3') ```
{% /codeBlock %}
{% /codePreview %}
A container to envelope all the tags for stepper functionality. Ensure to include only below tags inside this tag.
Use this tag to define the contents of a single step.
- srNumber (type - Number) It is the serial number of the step. It is used to identify which step to highlight with scrolling.
The description about the step. The title and the details about step should be included in this tag. For defining title use 'title' attribute. Add other information between opening and closing tags.
- title (type - String) Title of the step.
Use this tag to show images, videos, GIFs or CodeBlocks to provide additional information for the step. Add the tags for images, videos, GIFs or CodeBlocks between opening and closing tags.
Example:
{% stepsContainer %}
{% step srNumber=1 %}
{% stepDescription title="Step1 Title" %}
Step 1 description
{% /stepDescription %}
{% stepVisualInfo %}
{% image src="/step1-preview.png" alt="step1" caption="step1 caption" /%}
{% /stepVisualInfo %}
{% /step %}
{% extraContent parentTagName="stepsContainer" %}
Additional information between two steps
{% /extraContent %}
{% step srNumber=2 %}
{% stepDescription title="Step2 Title" %}
Step 1 description
{% /stepDescription %}
{% stepVisualInfo %}
{% image src="/step2-preview.png" alt="step2" caption="step2 caption" /%}
{% /stepVisualInfo %}
{% /step %}
{% /stepsContainer %}
Use following 4 tags to achieve the API page layout and functionalities.
A container tag to wrap all the content tags for API page layout.
A container tag to envelop "apiVisualInfo" and "apiDescription" tags
A tag to display visual information about APIs. May contain an Image or a code block.
A tag to show description about the API.
Example:
{% apiPageContainer %}
{% apiInfoContainer %}
{% apiDescription %}
## Title 1 API description
{% /apiDescription %}
{% apiVisualInfo %}
{% codeBlock fileName="open.json" %}
This is a new code
{% /codeBlock %}
{% /apiVisualInfo %}
{% /apiInfoContainer %}
{% apiInfoContainer %}
{% apiDescription %}
### SubTitle API description 2
{% /apiDescription %}
{% apiVisualInfo %}
{% codeBlock fileName="open.json" theme="light" %}
This is a new code
{% /codeBlock %}
{% /apiVisualInfo %}
{% /apiInfoContainer %}
{% apiInfoContainer %}
{% apiDescription %}
## Title 2 API description 2
{% /apiDescription %}
{% apiVisualInfo %}
{% codeBlock fileName="open.json" theme="gray" %}
This is a new code
{% /codeBlock %}
{% /apiVisualInfo %}
{% /apiInfoContainer %}
{% /apiPageContainer %}
A container tag to envelope inlineCallout
tags for the grid view.
A styled, open component, with icons, to navigate to pages.
-
icon (type - String) Name of the custom icon (celebration | fit_screen) or the identifier string to render the icons from 'Material Icons'. Visit https://react-icons.github.io/react-icons/icons?name=md to checkout the available icon.
-
bold (type - String) The content that should be written in bold.
-
href (type - String) The link which the tag will redirect to.
-
isExternalLink (type - Boolean) To determine whether the given
href
value refers to an external website page. Passfalse
if the link refers to a page from the documentation and thehref
has a relative path andtrue
if the entire path is provided inhref
.
Example:
{% inlineCalloutContainer %}
{% inlineCallout icon="celebration" bold="Title 1" href="/title-1" %} The first description 1. {% /inlineCallout %}
{% inlineCallout icon="celebration" bold="Title 2" href="/title-2" %} The first description 2. {% /inlineCallout %}
{% inlineCallout icon="open_in_new" bold="Title 3" href="/title-3" %} The first description 3. {% /inlineCallout %}
{% /inlineCalloutContainer %}
A container tag to envelope tile
tags for the grid view.
A styled, bordered component, with or without icons, to navigate to pages.
-
icon (type - String) Name of the custom icon or the identifier string to render the icons from 'Material Icons'. Visit https://react-icons.github.io/react-icons/icons?name=md to checkout the available icon
Available Custom Icons:
- administration
- collaboration
- discovery
- governance
- insight
- lineage
- quality
- steward
-
title (type - String) The title or the header of the tile.
-
description (type - String) Some description about the page the tile is referring to.
-
link (type - String) The link which the tile will redirect to.
-
isExternalLink (type - Boolean) To determine whether the given
href
value refers to an external website page. Passfalse
if the link refers to a page from the documentation and thehref
has a relative path andtrue
if the entire path is provided inhref
.
{% tilesContainer %}
{% tile icon="governance" title="Tile 1" description="The first tile description 1." link="/title-1" /%}
{% tile icon="collaboration" title="Tile 2" description="The first tile description 2." link="/title-2" /%}
{% tile icon="administration" title="Tile 3" description="The first tile description 3." link="/title-3" /%}
{% /tilesContainer %}
Tiles without the icons
Tiles with the icons