CODEDOC is an open-source tool that helps you with creating beautiful and modern software documentation. It creates a JAMStack app from your markdown files that you can easily deploy on services such as GitHub Pages.

1 link npm i -g @codedoc/cli



link Usage

Assume you have a repo on github named my-project and want to write documentations for it using codedoc. Install the codedoc cli, clone your repo locally, then:

1 link cd my-project

2 link codedoc init

3 link codedoc serve



Open a browser on the URL the CLI tool tells you (e.g. localhost:3000/my-project ) and see the docs boilerplate.

Your markdown files by default are located at docs/md/ , for example the main page you see will be from docs/md/index.md . The table of contents will also by default be on docs/md/_toc.md . Modify them and see the changes in realtime.





link Publishing

When you are done with your docs and want to publish them, say to GitHub Pages, simply run this command in your project folder:

1 link codedoc build



Then add all the built files and push to GitHub:

1 link git add -A

2 link git commit -m "meine docs"

3 link git push



Remember to enable GitHub Pages on your repo.

link Features

This very documentation was created using codedoc, so basically every feature you see here you would get for your own documentation. Check out this repository to see how exactly these documentations were created using codedoc.





link Enhanced Markdown

1 link Hi _ this _ is my content, and let me have some buttons beneath it:

2 link

3 link > :Buttons

4 link > > :Button icon=true, label=share, url=https://twitter.com

5 link >

6 link > > :Button label=Google!, url=https://stackblitz.com

Hi this is my content, and let me have some buttons beneath it: shareGoogle!









link Enhanced Code Snippets

1 link So I have some code with enhanced features here:

2 link ```tsx

3 link /*!*/import { build } from '@codedoc/core'; // --> programmatically import codedoc

4 link /*!*/import { join } from 'path'; // @see [official docs](https://nodejs.org/api/path.html)

5 link

6 link function doStuff() { // --> this function does stuff.

7 link console.log('Lets see the markdown again'); // @see tab:the markdown

8 link /*-*/ console.log('This line is removed');

9 link /*+*/ console.log('This line is added');

10 link

11 link this./*~*/methodWithErrors()/*~*/;

12 link }

13 link ```

14 link > :Buttons

15 link > > :CopyButton

So I have some code with enhanced features here: 1 link import { build } from '@codedoc/core' ;

2 link import { join } from 'path' ;

3 link

4 link function doStuff ( ) {

5 link console . log ( 'Lets see the markdown again' ) ;

6 link console . log ( 'This line is removed' ) ;

7 link console . log ( 'This line is added' ) ;

8 link

9 link this . methodWithErrors ~~~~~~~~~~~~~~~~ ( ~ ) ~ ;

10 link }

filter_none









link Customizability

Easily change any aspect of your docs, from theme colors and fonts to meta data of each page and their layouts. Create your own custom header or ToC with JSX/TSX-based components, or use custom JSX-TSX-based components in your markdown.

The component-based structure of codedoc simply means that you can even re-use your custom components across different projects, or you can publish them (for example to NPM) so that other people can enjoy them too!





link Integrated Search

If your project is on GitHub, codedoc by default includes a cross-docs search functionality using GitHub search API. You can also easily integrate your own search APIs into the default search components (besides being able to actually use your own custom search components).

The same search functionality is used on this documentation. You can check it out by clicking on the menu icon in the footer and opening the search functionality.





link Integrated Dark Mode

Its 2020, and dark-mode should be considered a universal right! Codedoc supports dark-mode on all your docs. Device settings is used by default, while allowing your readers to manually override this.





link Collaborative

Everything is markdown, so you can easily work on a project's documentation with your peers using any version control software like Git. No need for half-baked weird visual interfaces on top!





link Open-Source

Codedoc is an open-source tool, completely free-to-use, MIT-licensed, no strings attached. I simply needed this tool to write usable docs for some open-source projects I was working on.