From bca2335aa341836f1c102a8ba7e3bcf90755590c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 9 Dec 2014 14:58:18 +0100 Subject: [PATCH] doc: Add module documentation --- modules/doc/doc/1-module-documentation.md | 59 ++++++++++++++++++++++ modules/doc/public/img/doc/markdown.png | Bin 0 -> 2180 bytes 2 files changed, 59 insertions(+) create mode 100644 modules/doc/doc/1-module-documentation.md create mode 100644 modules/doc/public/img/doc/markdown.png diff --git a/modules/doc/doc/1-module-documentation.md b/modules/doc/doc/1-module-documentation.md new file mode 100644 index 000000000..968dd32d7 --- /dev/null +++ b/modules/doc/doc/1-module-documentation.md @@ -0,0 +1,59 @@ +# Writing Module Documentation + +![Markdown](/img/doc/doc/markdown.png) + +Icinga Web 2 is capable of viewing your module's documentation, if the documentation is written in +[Markdown](http://en.wikipedia.org/wiki/Markdown). Please refer to +[Markdown Syntax Documentation](http://daringfireball.net/projects/markdown/syntax) for Markdown's formatting syntax. + +## Where to Put Module Documentation? + +By default, your module's Markdown documentation files must be placed in the `doc` directory beneath your module's root +directory, e.g.: + + example-module/doc + +## Chapters + +Each Markdown documentation file represents a chapter of your module's documentation. The first found heading inside +each file is the chapter's title. The order of chapters is based on the case insensitive "Natural Order" of your files' +names. Natural Order means that the file names are ordered in the way which seems natural to humans. +It is best practice to prefix Markdown documentation file names with numbers to ensure that they appear in the correct +order, e.g.: + + 1-about.md + 2-installation.md + 3-configuration.md + +## Table Of Contents + +The table of contents for your module's documentation is auto-generated based on all found headings inside each +Markdown documentation file. + +## Linking Between Headings + +For linking between headings, place an anchor where you want to link to, e.g.: + + # Heading + +Now you can reference the anchor either in the same or **in another** Markdown documentation file, e.g.: + + This is a link to [Heading](#heading). + +## Including Images + +Images must placed in the `img` directory beneath your module's `public` directory, e.g.: + + example-module/public/img/doc + +Module images can be accessed using the following URL: + + {baseURL}/img/{moduleName}/{file} e.g. icingaweb/img/example-module/doc/example.png + +Markdown's image syntax is very similar to Markdown's link syntax, but prefixed with an exclamation mark, e.g.: + + ![Alt text](http://path/to/img.png "Optional Title") + +URLs to images inside your Markdown documentation files must be specified without the base URL, e.g.: + + ![Example](/img/example-module/doc/example.png) diff --git a/modules/doc/public/img/doc/markdown.png b/modules/doc/public/img/doc/markdown.png new file mode 100644 index 0000000000000000000000000000000000000000..93e729bc77ca37a36b97509e4cd552e1033973f9 GIT binary patch literal 2180 zcmaJ@3pCSxAD^wcY}Rs*WtD5G;fWbxQ?n;Z>?w^%R6I%eyW|avwnDTzlpgZBtwM^W z$&fc$p0XlZVkGpJ%9=})+uYyj>FGV^J@0wX@BDth^Z8yr-|z2ozQ11@)qNKVp@)D# zAShQC=Y8^7DDMnqMfn(SHgsM-DIVRk%Neq~(%AL4Ga(RVJ6Go&p0RnOeIBWSURr{2 zV9NH=6SaIdWsU6zYpF*>w^r?SPJ8+5^CpE~4C*p6D4tIbHc`%DUNAB?veYywr;e#^ zaz?4Cq&-PC+*Haouxvm2{sx1AYzT)DwFiqExY&4%=43HC+dds?#|>&h%xi^ zx;6p^oiWdh=I8VE`M9QZo$(Po7!aOhnQsZFP=G)5(%X|~By~=Fx_lO@0(H6fcjZ<{(!+q{M7 zL%a|jm|;W^eX>Z+2pb&>WxVuf6&!N%q75st9Gx}3Q_&xzMt`HSqJro z=%-qo`Uky~8XXLd8(}89bD>p%pY+T+uzIl$FBBc8OCTI?yA%ZPf+E(Vaz}doW~Y<1 zX6lV+Kiz{{drp-KLw>pkdUMIiS$`+v#&ciXRrd?z5=^O#DOo^RZ*8I8 zn39t$x64;()pZw=%nK<6kNl+3e3*sOdh~bFR-Jm$nF9xz(E1$M5aT54{a2{h_-um5 z*pMM*Y^a?KloXT@o!8nscnXD1qV_Gq*X9~?3AHgBx5Uc)<1OEMZGZ>U<7{6jW}-44 zCu#gV*-1_ISDtx5^4Dr}r{*u8E_V#_k#Hg)i9hn2Z#rPJI({T93Mgt*{`&UNvsduX z6>9z0^WO{=g$R!UnR$(^OeBApgWT8=!K7xMD$lkUSUqun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