├── .gitignore ├── docs ├── static │ ├── img │ │ ├── icon.png │ │ ├── logo.png │ │ └── background.svg │ └── css │ │ └── main.css ├── docs │ ├── static │ │ ├── img │ │ │ ├── icon.png │ │ │ └── logo.png │ │ ├── js │ │ │ └── main.js │ │ └── css │ │ │ └── main.css │ └── index.html ├── sources │ ├── building.md │ ├── installation.md │ ├── about.md │ └── manifest.md └── index.html ├── .cutedoc.yml ├── cmd └── cutedoc │ └── main.go ├── template ├── minimal │ ├── main.js.tmpl │ ├── index.html.tmpl │ └── main.css.tmpl └── bundle.go ├── README.md ├── doc.go ├── tasks.go └── LICENSE.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Project files. 2 | .idea/* -------------------------------------------------------------------------------- /docs/static/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickTheDev/cutedoc/HEAD/docs/static/img/icon.png -------------------------------------------------------------------------------- /docs/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickTheDev/cutedoc/HEAD/docs/static/img/logo.png -------------------------------------------------------------------------------- /docs/docs/static/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickTheDev/cutedoc/HEAD/docs/docs/static/img/icon.png -------------------------------------------------------------------------------- /docs/docs/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickTheDev/cutedoc/HEAD/docs/docs/static/img/logo.png -------------------------------------------------------------------------------- /docs/sources/building.md: -------------------------------------------------------------------------------- 1 | To build a project, simply execute the *cutedoc* command in a directory containing a *.cutedoc.yml* manifest file. 2 | ``` 3 | $ cutedoc 4 | ``` 5 | Cutedoc will create documentation in the manifest's specified output directory the contents will look like this: 6 | ``` 7 | /static 8 | /img 9 | icon.png 10 | logo.png 11 | /css 12 | main.css 13 | /js 14 | main.js 15 | index.html 16 | ``` 17 | -------------------------------------------------------------------------------- /.cutedoc.yml: -------------------------------------------------------------------------------- 1 | build: 2 | dir: docs/docs 3 | meta: 4 | title: Cutedoc 5 | author: NickTheDev 6 | description: Cutedoc's documentation. 7 | branding: 8 | icon: docs/static/img/icon.png 9 | logo: docs/static/img/logo.png 10 | articles: 11 | Introduction: 12 | Intro: docs/sources/about.md 13 | Installing: docs/sources/installation.md 14 | Projects: 15 | Manifests: docs/sources/manifest.md 16 | Building: docs/sources/building.md -------------------------------------------------------------------------------- /docs/docs/static/js/main.js: -------------------------------------------------------------------------------- 1 | document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("div pre").forEach(function(value){hljs.highlightBlock(value);});document.getElementById("nav-burger").addEventListener("click",function(){document.getElementById("mobile-nav").classList.toggle("nav-open")});document.querySelectorAll(".nav-collapse li a").forEach(function(value){value.addEventListener("click",function(){document.getElementById("mobile-nav").classList.remove("nav-open");});});}); -------------------------------------------------------------------------------- /cmd/cutedoc/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/nickthedev/cutedoc" 5 | "log" 6 | "os" 7 | ) 8 | 9 | // main loads the documentation config in either the current directory or a specified one and generates documentation using it. 10 | func main() { 11 | log.SetFlags(0) 12 | log.SetOutput(os.Stdout) 13 | 14 | if doc, err := cutedoc.New(); err == nil { 15 | if err = cutedoc.Run(doc); err != nil { 16 | log.Fatalf("An error occured generating documentation: \n\t%v.", err) 17 | } 18 | } else { 19 | log.Fatalf("An error occurred loading the documentation config: \n\t%v.", err) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docs/sources/installation.md: -------------------------------------------------------------------------------- 1 | If you already have [Go](https://golang.org/) installed, you can easily grab the latest version of 2 | Cutedoc by using the *go get* command in the console. If your GOPATH/bin env variable is set, the 3 | cutedoc command will be accessible without having to specify the executable path. 4 | 5 | ``` 6 | $ go get github.com/NickTheDev/cutedoc/cmd/cutedoc 7 | ``` 8 | If you do not have or wish to install Go, you can grab a pre-built binary from 9 | [Github](https://github.com/NickTheDev/cutedoc/releases). However, with this method you will have 10 | to optionally add the executable to your env variables yourself. -------------------------------------------------------------------------------- /template/minimal/main.js.tmpl: -------------------------------------------------------------------------------- 1 | // Loads syntax highlighting and the mobile navigation. 2 | document.addEventListener("DOMContentLoaded", function() { 3 | document.querySelectorAll("div pre").forEach(function(value) { 4 | hljs.highlightBlock(value); 5 | }); 6 | 7 | document.getElementById("nav-burger").addEventListener("click", function() { 8 | document.getElementById("mobile-nav").classList.toggle("nav-open") 9 | }); 10 | 11 | document.querySelectorAll(".nav-collapse li a").forEach(function(value) { 12 | value.addEventListener("click", function() { 13 | document.getElementById("mobile-nav").classList.remove("nav-open"); 14 | }); 15 | }); 16 | }); -------------------------------------------------------------------------------- /docs/sources/about.md: -------------------------------------------------------------------------------- 1 | We've all been there, just finishing up our awesome project, whether it be a design framework 2 | or front-end library, and finding ourselves wondering how to create documentation for the project. 3 | We find ourselves envying the beautiful documentation of companies like Stripe, but instead opting 4 | out of creating custom documentation due to the amount of work it would require. Cutedoc is a simple 5 | command line tool that can be used to solve this problem. 6 | 7 | Using technologies that you already know and love, like github flavored markdown, you can create beautiful documentation sites 8 | by simply creating markdown files and then stitching them together using a simple manifest file. Cutedoc leverages a high level 9 | of *customization* through the manifest file and allows you to specify the template theme and color scheme, the logo and icon of 10 | used, project metadata, and more. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |  2 | 3 | # cutedoc 4 | Cutedoc is a simple command line tool that allows you to generate beautiful static documentation using simple markdown files. 5 | You can learn more about the project at https://nickthedev.github.io/cutedoc. 6 | 7 | # Getting Started 8 | If you already have Go installed, you can easily grab the latest version of Cutedoc by using the go get command in the console. 9 | If your GOPATH/bin env variable is set, the cutedoc command will be accessible without having to specify the executable path. 10 | 11 | ``` 12 | $ go get github.com/NickTheDev/cutedoc/cmd/cutedoc 13 | ``` 14 | If you do not have or wish to install Go, you can grab a pre-built binary from Github. However, with this method you will have to 15 | optionally add the executable to your env variables yourself. 16 | 17 | # Demo 18 | Cutedoc's documentation was created with Cutedoc, and can be found at https://nickthedev.github.io/cutedoc/docs. 19 | 20 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |Documentation made simple.
24 |Easily generate stunning static documentation for any project using simple markdown.
25 | go to docs → 26 |We've all been there, just finishing up our awesome project, whether it be a design framework 75 | or front-end library, and finding ourselves wondering how to create documentation for the project. 76 | We find ourselves envying the beautiful documentation of companies like Stripe, but instead opting 77 | out of creating custom documentation due to the amount of work it would require. Cutedoc is a simple 78 | command line tool that can be used to solve this problem.
79 | 80 |Using technologies that you already know and love, like github flavored markdown, you can create beautiful documentation sites 81 | by simply creating markdown files and then stitching them together using a simple manifest file. Cutedoc leverages a high level 82 | of customization through the manifest file and allows you to specify the template theme and color scheme, the logo and icon of 83 | used, project metadata, and more.
84 | 85 |If you already have Go installed, you can easily grab the latest version of 94 | Cutedoc by using the go get command in the console. If your GOPATH/bin env variable is set, the 95 | cutedoc command will be accessible without having to specify the executable path.
96 | 97 |$ go get github.com/NickTheDev/cutedoc/cmd/cutedoc
98 |
99 |
100 | If you do not have or wish to install Go, you can grab a pre-built binary from 101 | Github. However, with this method you will have 102 | to optionally add the executable to your env variables yourself.
103 | 104 |To create your project, start by creating a .cutedoc.yml file in a directory of your choice, usually 114 | the in the root of your project. This is the general structure of a manifest file:
115 | 116 |meta:
117 | title: Cutedoc
118 | author: NickTheDev
119 | description: Cutedoc's documentation.
120 | branding:
121 | icon: docs/static/img/icon.png
122 | logo: docs/static/img/logo.png
123 | articles:
124 | Introduction:
125 | Intro: docs/sources/about.md
126 |
127 | To describe basic characteristics of the project, you can define a meta section in the manifest 131 | file. In this section you may define meta such as the title, author, and description and the 132 | project branding.
133 | 134 |# Project metadata.
135 | meta:
136 | # Html header metadata title. Default is blank.
137 | title: Cutedoc
138 |
139 | # Html header metadata author. Default is blank.
140 | author: NickTheDev
141 |
142 | # Html header metadata description. Default is blank.
143 | description: Cool documentation.
144 |
145 | # Project branding.
146 | branding:
147 | # Html header favicon, preferably 16 x 16. Default is null.
148 | icon: path/to/icon.png
149 |
150 | # Logo of the project, preferably 200 x 100. Default is null.
151 | logo: path/to/logo.png
152 |
153 | To configure the build of your project, you can define a build section in the manifest file. In this section you may 157 | specify the output directory of the build and whether to minify the production assets or not.
158 | 159 |# Build config.
160 | build:
161 | # Output directory of the documentation. Default is 'docs'.
162 | dir: docs
163 |
164 | # Whether or not to minify the build assets (css, js). Default is true.
165 | minify: true
166 |
167 | To link markdown files in your project, you can define an articles section in the manifest file. 171 | In this section you may define article groups, and then place the links in them.
172 | 173 |# Project articles.
174 | articles:
175 | # Article group name.
176 | Introduction:
177 | # Path to article markdown file, may use github flavored markdown.
178 | Intro: docs/sources/about.md
179 |
180 | To configure the theme of your project, you can define a theme section in the manifest file. 184 | You may specify the template name, the only one currently being the minimal theme (The 185 | documentation you are reading right now uses the minimal theme). You can also 186 | define the color scheme of the template, namely the primary, secondary, text, nav, and 187 | background colors.
188 | 189 |# Project theme.
190 | theme:
191 | # Theme template, currently the only supported template is 'minimal'. Default is 'minimal'.
192 | template: minimal
193 |
194 | # Template color scheme.
195 | colors:
196 | # Primary color used for headers and navigation group text colors. Default is 3e4669.
197 | primary: 3e4669
198 |
199 | # Secondary color used an accent in the navigation and the body headers. Default is c3c6de.
200 | secondary: c3c6de
201 |
202 | # Body text color used in the documentation. Default is 3e4669.
203 | text: 3e4669
204 |
205 | # Navigation background color. Default is fff.
206 | nav: fff
207 |
208 | # Background color. Default is f6f7fb.
209 | background: f6f7fb
210 |
211 |
212 | To build a project, simply execute the cutedoc command in a directory containing a .cutedoc.yml manifest file.
221 | 222 |$ cutedoc
223 |
224 |
225 | Cutedoc will create documentation in the manifest's specified output directory the contents will look like this:
226 | 227 |/static
228 | /img
229 | icon.png
230 | logo.png
231 | /css
232 | main.css
233 | /js
234 | main.js
235 | index.html
236 |
237 |
238 |