MCPcopy Index your code
hub / github.com/docuowl/docuowl

github.com/docuowl/docuowl @v0.2.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.4 ↗ · + Follow
647 symbols 1,750 edges 68 files 228 documented · 35%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

🦉 Docuowl

Docuowl generates a static single-page documentation from Markdown files

Rationale

As a long-time fan of documentation style made by Stripe, and Markdown, I decided to use the former as a base to create a pretty documentation generator that outputs something like Stripe's. Stripe also generously allowed me to use their layout, so here's a big thank you to them! ♥️

Demo

Looking for a demo? A simple demo is available at https://docuowl.github.io/demo/!

Docuowl Screenshot

Installing

Brew

To install Docuowl using Homebrew, execute the following command:

brew install docuowl/tap/docuowl

Manually

Refer to the releases page to get the latest version.

Documentation Organization

Docuowl takes a directory as input. The directory is expected to have one directory for each section or group. Each group may have subsections, which by their turn must also be placed into directories. Each Section is required to have an content.md file, containing the Frontmatter for that section, and an optional sidenotes.md file, that will be rendered to the right of the section. The Frontmatter must contain at least a Title property, and an optional ID property containing a unique slug for that section. Each Group must contain a single meta.md file, containing a Frontmatter like a Section, and an optional content following the frontmatter.

For instance, take the following directory tree as example:

.
├── 1-introduction
│   └── content.md
├── 2-errors
│   ├── content.md
│   └── sidenotes.md
├── 3-authentication
│   ├── content.md
│   └── sidenotes.md
├── 4-authorization
│   ├── 1-login
│   │   ├── content.md
│   │   └── sidenotes.md
│   ├── 2-logout
│   │   ├── content.md
│   │   └── sidenotes.md
│   ├── 4-me
│   │   ├── content.md
│   │   └── sidenotes.md
│   └── meta.md
├── 5-foo
│   ├── 1-listing-foos
│   │   ├── content.md
│   │   └── sidenotes.md
│   ├── 2-merged-foos
│   │   ├── content.md
│   │   └── sidenotes.md
│   └── meta.md
├── 6-bars
│   ├── content.md
│   └── sidenotes.md
├── 7-list-foobars
│   ├── content.md
│   └── sidenotes.md
├── 8-get-foobar
│   ├── content.md
│   └── sidenotes.md
└── 9-foobar-data
    ├── content.md
    └── sidenotes.md

Example of meta.md:

---
Title: Authorization
---

> :warning: **Warning**: All authorization endpoints are currently in maintenance

Markdown Extensions

Docuowl introduces two new blocks to Markdown: Boxes and Attributes List.

Boxes

Boxes can only be used in sidenotes. To create a new box, use the following format:

#! This is a box
And this is the box's content

After one #!, the box will take any content that follows until one of the following conditions are met:

  1. A horizontal ruler is found (----)
  2. Another Box begins.

Attributes List

Attributes Lists can only be used in contents. To create a new Attribute List, use the following format:

#- Attribute List
- Key1 `type`
- Key1 Description

Usage

Docuowl can be invoked in two modes: Compile, and Watch.

Compile

Compilation will output a single index.html file to an specified directory, taking another directory as input. For instance:

$ docuowl --input docs --output docs-html

Watch

Watch allows one to continuously write documentation and see the preview with auto-reload. For that, use:

$ docuowl --input docs --output docs-html --watch

Docuowl v0.1
Listening on 127.0.0.1:8000

Then open your browser and point to 127.0.0.1:8000. The page will be reloaded each time a file changes in the input directory.

Building

In order to locally build, use the provided Makefile. Steps consist of running cmd/static-generator/main.go, responsible for compiling static files required by static/static.go, and running go build on cmd/docuowl/main.go.

TODO

  • [ ] Full-text Search
  • [ ] Add tests

License

This software uses other open-source components. For a full list, see the LICENSE file.

MIT License

Copyright © 2021 Victor Gama
Copyright © 2021 Real Artists

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Extension points exported contracts — how you extend this code

Renderer (Interface)
Renderer is an interface for implementing custom renderers. [2 implementers]
markdown/markdown.go
Node (Interface)
Node defines an ast node [2 implementers]
markdown/ast/node.go
BlockFunc (FuncType)
BlockFunc allows to registration of a parser function. If successful it returns an ast.Node, a buffer that should be par
markdown/parser/options.go
RenderNodeFunc (FuncType)
RenderNodeFunc allows reusing most of Renderer logic and replacing rendering of some nodes. If it returns false, Rendere
markdown/html/renderer.go
Entity (Interface)
(no doc) [2 implementers]
fs/fs.go
NodeVisitor (Interface)
NodeVisitor is a callback to be called when traversing the syntax tree. Called twice for every node: once with entering=
markdown/ast/node.go
ReadIncludeFunc (FuncType)
ReadIncludeFunc should read the file under path and returns the read bytes, from will be set to the name of the current
markdown/parser/options.go
NodeVisitorFunc (FuncType)
NodeVisitorFunc casts a function to match NodeVisitor interface
markdown/ast/node.go

Core symbols most depended-on inside this repo

Outs
called by 52
markdown/html/renderer.go
outs
called by 34
markdown/md/md_renderer.go
addBlock
called by 34
markdown/parser/block.go
CR
called by 32
markdown/html/renderer.go
GetChildren
called by 20
markdown/ast/node.go
isSpace
called by 18
markdown/parser/parser.go
skipChar
called by 17
markdown/parser/block.go
skipUntilChar
called by 16
markdown/parser/block.go

Shape

Function 345
Method 215
Struct 63
TypeAlias 11
FuncType 7
Interface 4
Class 2

Languages

Go96%
TypeScript4%

Modules by API surface

markdown/html/renderer.go96 symbols
markdown/ast/node.go84 symbols
markdown/parser/block.go54 symbols
markdown/block_test.go34 symbols
markdown/parser/inline.go33 symbols
markdown/inline_test.go33 symbols
fs/fs.go29 symbols
markdown/parser/parser.go28 symbols
markdown/md/md_renderer.go28 symbols
markdown/ref_test.go26 symbols
markdown/html/smartypants.go22 symbols
static/js/owl_wasm.js21 symbols

For agents

$ claude mcp add docuowl \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact