Merge pull request #143 from Gautham/Dev

Fix Issues #140 & #142
This commit is contained in:
Denis Kisselev 2014-03-13 11:29:33 -07:00
commit 36ee509166
2 changed files with 10 additions and 5 deletions

View File

@ -2,7 +2,7 @@
// Generate Static Documentation // Generate Static Documentation
function generate_static($out_dir) { function generate_static($out_dir) {
global $tree, $base, $docs_path, $output_path, $options, $mode, $multilanguage, $output_language; global $tree, $base, $base_doc, $docs_path, $output_path, $options, $mode, $multilanguage, $output_language;
$mode = 'Static'; $mode = 'Static';
if ($out_dir === '') $output_path = $base . '/static'; if ($out_dir === '') $output_path = $base . '/static';
else { else {
@ -18,10 +18,15 @@
generate_static_branch($tree[$languageKey], $languageKey); generate_static_branch($tree[$languageKey], $languageKey);
} }
$index = $docs_path . '/index.md'; $index = $docs_path . '/index.md';
if (is_file($index)) { if (!is_file($index)) {
$index = generate_page($index); if (empty($options['languages'])) $index = $base_doc;
file_put_contents($output_path . '/index.html', $index); else {
$t = array_keys($base_doc);
$index = $base_doc[$t[0]];
}
} }
$index = generate_page($index);
file_put_contents($output_path . '/index.html', $index);
} }
// Generate Static Content For Given Directory // Generate Static Content For Given Directory

View File

@ -154,7 +154,7 @@
<div id="sub-nav-collapse" class="sub-nav-collapse"> <div id="sub-nav-collapse" class="sub-nav-collapse">
<!-- Navigation --> <!-- Navigation -->
<?php echo get_navigation($file); ?> <?php echo get_navigation($file); ?>
<?php if (!empty($options['links']) || !empty($options['twitter'])) { ?> <?php if (!empty($options['links']) || !empty($options['twitter'] || $options['toggle_code'])) { ?>
<div class="well well-sidebar"> <div class="well well-sidebar">
<!-- Links --> <!-- Links -->
<?php foreach($options['links'] as $name => $url) { ?> <?php foreach($options['links'] as $name => $url) { ?>