docm
TypeScript icon, indicating that this package has built-in type declarations

0.2.15 • Public • Published

docm

A magical documentation site generator.

npm version Downloads license

💿 Installation

Being easy to use is one of our core principles. First, you need to install docm docm-theme-default on your project using some package manager (we're assuming Yarn here):

$ yarn add docm docm-theme-default --dev
 
# use npm 
$ npm install --save-dev docm docm-theme-default

After you installed docm docm-theme-default in your project, you may find it convenient to add two scripts in your package.json to run docm for you. This is an optional step:

{
  "name": "myproject",
  "scripts": {
    "docm:dev": "docm dev",
    "docm:build": "docm build"
  },
  "devDependencies": {
    "docm": "latest",
    "docm-theme-default": "latest"
  }
}

Now you can spin up your dev server just by running:

$ yarn docm:dev

📖 Usage

With your dev server up, you can start writing your documentation.

Docm uses MDX as a standard format because of the flexibility of writing JSX inside markdown files. Really cool, no?

Note that you don't need to follow any strict file architecture. You can just create your .mdx files anywhere in your project.

So, let's create our first .mdx and give it a name:

---
name: Hello world
---
 
Hello world
 
Hello, I'm a mdx file!

Now, just run your dev server:

$ yarn docm dev

With the server up and your first .mdx created, you can open your browser and visit localhost:3000 and you should see something.

That's it! Now you have a real badass documentation 👊

Easy, right?

Now that you know how to get started with docm, see the docs where we'll delve into MDX and how you can use it to write your documents.

🍻 Contributing

Welcome♡

Bug Reports or Feature Requests

Please use GitHub Issues.

Correct Documents

Please use GitHub Pull Requests.

I'm not familiar with English, so I especially thank you for documents' corrections.

License

MIT

Package Sidebar

Install

npm i docm

Weekly Downloads

0

Version

0.2.15

License

MIT

Unpacked Size

86.2 kB

Total Files

29

Last publish

Collaborators

  • fullbook