tyn1998 / opensumi-gatsby-theme

The Gatsby theme for OpenSumi documentation site.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This Theme is modified from antvis/gatsby-theme-antv, thanks for their contribute.

homepage

Gatsby Theme for OpenSumi

✨ Polished Gatsby theme for documentation site.

NPM downloads CI status prettier code style

Features

  • πŸ” Docsearch v3, React 18, Gatsby 4 supported.
  • 🎨 Prerendered static site
  • 🌎 Internationalization support by i18next
  • πŸ“ Markdown-based documentation and menus
  • πŸ— Unified Theme and Layout
  • 🎲 Easy customized header nav
  • 🧩 Built-in home page components

Develop

yarn
yarn start

Visit https://localhost:8000 to preview.

Add Dependency

cd @opensumi/gatsby-theme
yarn add shallowequal

or

yarn workspace @opensumi/gatsby-theme add shallowequal

Q&A

How to customise layout footer?

// gatsby-browser.js
exports.wrapPageElement = ({ element, props }) => {
  return React.cloneElement(element, {
    ...props,
    ...element.props,
    // https://github.com/react-component/footer#api
    footerProps: {
      bottom: 'xxx',
    },
  });
};

How to embed other markdown document in a markdown document

`markdown:docs/common/data-mapping.zh.md`

docs/common/data-mapping.zh.md is the path relative to the current project. It supports multiple levels of nested.

Related libraries

About

The Gatsby theme for OpenSumi documentation site.

License:Other


Languages

Language:TypeScript 56.8%Language:Less 31.4%Language:JavaScript 11.8%