Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Update documentation for Folder Scoped Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jhm-ciberman committed Mar 19, 2018
1 parent 0f9baaf commit ae1e9ed
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,45 @@ Check the help for the `generate` command with `docs_gm generate --help` to see

You can create custom HTML templates and use them with docs_gm. Refer to [this page](./custom_templates.md) for how to create a custom template.

## Folder scoped documentation

If you want to add documentation for one folder containing multiple scripts, you can create a GameMaker script called: `FOLDER_anyname` or `MODULE_anyname` inside your folder and add a simple JSDoc comment inside that script with the documentation for your module. You can use [markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).

For example:

```text
+ scripts [root folder]
+ inventory_system [folder]
- FOLDER_inventory_system [script]
- inventory_add_item [script]
- inventory_get_item [script]
- inventory_draw [script]
```

Inside FOLDER_inventory_system script you can write something like this:

```js
/**
* Inventory System
* ================
*
* > By Javier "Ciberman" Mora
*
* You can use this functions to create your inventory
* and you need to... bla bla bla...
* More documentation **with markup** here.
*
* - You can create bullets
* - with items
*
* And also add [links](http://google.com).
*/
```

Then you can use any template with a design that supports modules. (For example the `docs_gm-basic` Template has `modules-onepage` and `modules-multipage` designs.)

> Note: you can create multiple subfolders and document each one with one `MODULE_` or `FOLDER_` script inside each subfolder.
## Contribute

I would love to see people interested in contributing to docs_gm. If you have some idea, or bug, you can send a Issue in the github page. Also, you can check the [contribute document](CONTRIBUTE.md)
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ae1e9ed

Please sign in to comment.