Socket
Socket
Sign inDemoInstall

docium

Package Overview
Dependencies
51
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    docium

[Demo](https://xdan.github.io/docium/)


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

1.0.4

18 May 2021

Readme

Source

Docium - Documentation static generator

Demo

Documentation static generator for programmers

Get started

touch README.md
echo "First documentation page" > README.md
npx docium ./ ./dist/
cd ./dist
ls ./
assets
 css
 js

media
 images

index.html

It generates static site with documentation mardown files + JSDoc API.

Options

--config (default: "./docium.js" || "./docium.json" || "./.docium")

Configuration file. Instead, this you can create docium section in package.json.

--watch (default: false)

Enable watching on file changing and rebuild by this.

--theme (default: "light")

Theme. Possible values: dark, light.

--template (default: "standard")

Template for documentation. You can create yourself template and set it as path.

npx docium --template ./src/docium-template

More about template

--colors

Dictionary for theme.

{
  "colors": {
    "body-background": "#fff",
    "text-color": "#000",
    "link-color": "#555 #66f #111" // Default Hover Visited
  }
}

--code-highlighter (default: "prism")

Syntax highlighter for code sections.

--code-highlighter-options

Syntax highlighter options

--base-url

By default docuim generates relative paths for all html files. You can change this behaviour.

npx docium ./ --base-url https://xdsoft.net/jodit/doc/

--examples (default: "./examples")

Folder for examples. You can put it inside your markdown file.

touch ./example/1.js
echo "alert('Hello!')" > ./example/1.js

In your markdown you can use this example by name

{example 1}

You can use jsx,html, js files.

Or you can create folder for example item:

mkdir ./example/my-ex/
touch ./example/my-ex/some-name.js
touch ./example/my-ex/some-name.html
echo "alert(document.getElementById('example').innerHTML)" > ./example/1/some-name.js
echo "<div id='example'>Test</div>" > ./example/1/some-name.html
{example my-ex}

--show-source-for-example (default: true)

Show tabs with HTML/JS/CSS sections. In {example 1} place

--generate-api (default: true)

Generate API by jsdoc & typescript.

--api-section (default: "api")

Path in documentation for API section.

--excludes (default: ['node_modules'])

Exclude directories from generation.

--plugins

List of plugins.

{
	"plugins": [
		[
			"docium-github-links",
			{
				"stars": true,
				"source": true
			}
		],
		[
			"google-analytics",
			{
				"id": "UA-634584-2"
			}
		],
		"docium-allow-react-in-ex"
	]
}

Plugins

  • docium-github-links - insert link to github repository.
  • docium-allow-react-in-ex - allow use React in your examples.

License

MIT

Keywords

FAQs

Last updated on 17 May 2021

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