Skip to content

Commit

Permalink
Added the option to ignore files in root.
Browse files Browse the repository at this point in the history
  • Loading branch information
sambenne committed Jun 28, 2012
1 parent 14a4627 commit 4cda712
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion assets/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,16 @@ function rglob($pattern='*', $flags = 0, $path='')
*
* @return string $html
*/
function generate()
function generate($ignore = false)
{
$files = $this->rglob('*'.$this->filetype,0,$this->dir);

if($ignore) {
foreach ($files as $k => $v) {
if(is_int($k)) unset($files[$k]);
}
}

$this->html = "";

$this->_list_files($files);
Expand Down
7 changes: 6 additions & 1 deletion mdocs.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
$config->maxlevel = 1;
$config->minlevel = 2;

/**
* Ignore files in the root of Docs?
*/
$config->ignore = true;



/**
Expand Down Expand Up @@ -104,7 +109,7 @@
$doc = $geshi->parse_codeblocks($doc);

// Create Menu:
$menu->generate();
$menu->generate($config->ignore);

// Create TOC:
$toc->generate();
Expand Down

0 comments on commit 4cda712

Please sign in to comment.