From ee8eb4e7b558ccd3fa00e3d058544f7561a6a35e Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Thu, 4 Mar 2010 08:54:17 +0000 Subject: [PATCH] MINOR: changed path for docs from docs to doc --- code/DocumentationViewer.php | 6 +++--- docs/Writing-Documentation.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/DocumentationViewer.php b/code/DocumentationViewer.php index 6122734..b9be3c7 100755 --- a/code/DocumentationViewer.php +++ b/code/DocumentationViewer.php @@ -62,7 +62,7 @@ class DocumentationViewer extends Controller { // see if docs folder is present $subfolders = scandir(BASE_PATH .'/'. $module); - if($subfolders && in_array('docs', $subfolders)) { + if($subfolders && in_array('doc', $subfolders)) { $this->generateNestedTree($module); } else { @@ -121,7 +121,7 @@ class DocumentationViewer extends Controller { $base = Director::baseURL(); // find page - $path = BASE_PATH . '/'. $module .'/docs/'; + $path = BASE_PATH . '/'. $module .'/doc/'; echo "
"; if($page = $this->findPage($path, $class)) { @@ -179,7 +179,7 @@ class DocumentationViewer extends Controller { * @param String - module to generate */ private function generateNestedTree($module) { - $path = BASE_PATH . '/'. $module .'/docs/'; + $path = BASE_PATH . '/'. $module .'/doc/'; return (is_dir($path)) ? $this->recursivelyGenerateTree($path, $module) : false; } diff --git a/docs/Writing-Documentation.md b/docs/Writing-Documentation.md index e98edfd..5e0a8a8 100644 --- a/docs/Writing-Documentation.md +++ b/docs/Writing-Documentation.md @@ -2,13 +2,13 @@ Your documentation needs to go in the specific modules doc folder which it refers mostly too. For example if you want to document -a feature of your custom module 'MyModule' you need to create markdown files in mymodule/docs/. +a feature of your custom module 'MyModule' you need to create markdown files in mymodule/doc/. The files have to end with the __.md__ extension. The documentation viewer will automatically replace hyphens (-) with spaces (since you cannot have spaces easily in some file systems). ## Syntax ## -This uses a customized markdown extra parser. To view the syntax for page formatting check out [http://daringfireball.net/projects/markdown/syntax](Daring Fireball) +This uses a customized markdown extra parser. To view the syntax for page formatting check out [http://daringfireball.net/projects/markdown/syntax][Daring Fireball] ## Creating Hierarchy ##