Docz: Extend docz-default-theme Page component

Created on 31 Jan 2019  路  5Comments  路  Source: doczjs/docz

Is it possible to extend docz-default-theme Page component in an easy way?

For example, some of the documentation pages might have some meta data

PackageA.mdx:

---
name: Textfield
menu: Core
route: /core/textfield
version: 1.1.0
author: Hu Chen
packageName: textfield
link: http://google.com
---

Some content

For these pages, I would like to display a custom React component with these data (a custom Table component) before the content in mdx file as they repeat over and over again.

Can we add support for something like this?

Most helpful comment

exposing the components from docz-default-theme gonna be awesome! 馃槏

All 5 comments

The reason not to use a custom components is that I want to include some markdown headings in it as well:

````

{Header from data}

Installation

yarn add {some dynamic content from package.json}

Versions

A React component with some data
````

Or can how can we make markdown content dynamic? Can we expose the H1 - H6 component from docz-default-theme? what do you think

exposing the components from docz-default-theme gonna be awesome! 馃槏

just noticed there is already a request for this.. closing mine: https://github.com/pedronauck/docz/issues/647

@rakannimer what is the reason this issue get closed?

Was this page helpful?
0 / 5 - 0 ratings