YFM Docs Components
Компоненты для Yandex Flavored Markdown Documentation.
Installation
npm i @diplodoc/components
Usage
Append js
import "@doc-tools/transform/dist/js/yfm.js";
import {createRoot} from 'react-dom/client';
import {ThemeProvider} from '@gravity-ui/uikit';
import {configure as configureUikit} from '@gravity-ui/uikit';
import {configure as configureDocs} from '@diplodoc/components';
configureUikit({lang: 'ru'});
configureDocs({
lang: 'ru',
loc: {ru, en, tr, ...}
})
const root = createRoot(document.getElementById('root'));
root.render(
<ThemeProvider theme="light">
<App />
</ThemeProvider>,
);
Append css
@import '@diplodoc/components';
@import '@diplodoc/components/themes/common';
@import '@doc-tools/transform/dist/css/yfm.css';
Development
To build the project correctly you need to install python@2
.
Visit python.org/downloads to get the latest version.
Install Dependencies
npm ci
cd demo && npm ci
To start the development server with storybook run the following:
npm run dev
License
MIT