Socket
Socket
Sign inDemoInstall

docz

Package Overview
Dependencies
18
Maintainers
2
Versions
268
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    docz

It's has never been so easy to documents your things!


Version published
Weekly downloads
4.3K
increased by7.36%
Maintainers
2
Created
Weekly downloads
 

Changelog

Source

2.4.0 (2022-02-11)

Bug Fixes

  • babel-plugin-export-metadata: fix hasOwnProperty method call (#1581) (9067ffb)
  • dev-env/basic: building and running development (#1646) (7baaaf2)
  • docz: dependency issues (#1647) (5bdca48)
  • docz-utils: fix closing tag detection in removeTags (#1696) (bfcd923)
  • examples: import alert component by correct lib name. (#1605) (fadb6dd)
  • gatsby-theme-docz: wrong imports (ed169cf)
  • add functions never to eslint rule (#1487) (becd589)

Features

  • add gatsby https flag to use in dev mode (#1569) (9d91503)
  • docz-core: add modifyEntry plugin supported (#1621) (317987e)
  • gatsby-theme-docz: configure SEO information from md/mdx files (#1477) (24bb600)
  • gatsby-theme-docz: no reload on relative links (#1482) (ff7211c)

Readme

Source

Chat

Docz makes it easy to write and publish beautiful interactive documentation for your code.

Create MDX files showcasing your code and Docz turns them into a live-reloading, production-ready site.

docz example

Table of Contents

Why ?

Documenting code is one of the most important and time-heavy processes when developing software.

A lot of time is spent on building and maintaining custom documentation sites.

Docz enables you to quickly create live-reloading, seo-friendly, production-ready documentation sites with MDX and customize the look, feel and behavior when required by leveraging GatsbyJS and Gatsby theme shadowing.

Start a New Project

Use create-docz-app to quickly get started :

npx create-docz-app my-docz-app
# or
yarn create docz-app my-docz-app --example typescript

Add Docz to an Existing Project

Start by adding docz as a dependency :

$ yarn add docz@next # react react-dom

# or

$ npm install docz@next # react react-dom

Note: react and react-dom will not be installed automatically. You'll have to install them yourself.

Then, add .mdx files anywhere in your project:

---
name: Button
route: /
---

import { Playground, Props } from 'docz'
import Button from './Button'

# Button

<Props of={Button} />

## Basic usage

<Playground>
  <Button type="submit">Click me</Button>
  <Button>No, click me</Button>
</Playground>

And a Button component Button.jsx:

import React from 'react'
import t from 'prop-types'

const Button = ({ children, type }) => <button type={type}>{children}</button>

Button.propTypes = {
  /**
   * This is a description for this prop.
   * Button type.
   */
  type: t.oneOf(['button', 'submit', 'reset']),
}
Button.defaultProps = {
  type: 'button',
}
export default Button

Finally, run:

yarn docz dev

This will start a local development server and open your documentation site in the browser.

Build

yarn docz build will generate a static site for your site in .docz/dist/.

You can try it out with yarn docz serve or by serving the generated site with your favorite static file server (e.g. npx serve .docz/dist).

You can have yarn docz build emit to a different directory by providing a path to the dest field in your doczrc.js or from the command line : yarn docz build --dest docs-site-directory.

Deploy

The output of docz consists of static assets only. This allows you to deploy your generated docz site with any static site hosting provider you'd like.

Start by building your site with yarn docz build, if you haven't provided a dest flag to your config then you will find your generated files in .docz/dist to copy to the server.

Examples

You can check the complete list of docz examples here.

More info on docz.site

Used by

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Contributing

All kinds of contributions are very welcome and appreciated !

If you want to contribute time to docz then here's a list of suggestions to get you started :

  1. Star the project.
  2. Help people in the issues by sharing your knowledge and experience.
  3. Find and report issues.
  4. Submit PRs to help solve issues or add features.
  5. Influence the future of docz with feature requests.

If you're looking for a place to start make sure to check issues tagged with :

Good First Issue

And make sure to read the Contributing Guide before making a pull request.

You can also contribute money to help secure docz's future.

Open Collective

FAQs

Last updated on 11 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc