[from now] 2014/09/18 08:24:36

diff --git a/gaiden-core/src/main/groovy/gaiden/Document.groovy b/gaiden-core/src/main/groovy/gaiden/Document.groovy
index 1b91f01..891159b 100644
--- a/gaiden-core/src/main/groovy/gaiden/Document.groovy
+++ b/gaiden-core/src/main/groovy/gaiden/Document.groovy
@@ -40,6 +40,7 @@ Page previousPageOf(Page page) {
     }

     Page nextPageOf(Page page) {
+        page.source.path.subpath()
         if (!pageOrder.contains(page) || pageOrder.last() == page) {
             return null
         }
diff --git a/gaiden-core/src/main/groovy/gaiden/DocumentBuilder.groovy b/gaiden-core/src/main/groovy/gaiden/DocumentBuilder.groovy
index 484f3f6..eebaef0 100644
--- a/gaiden-core/src/main/groovy/gaiden/DocumentBuilder.groovy
+++ b/gaiden-core/src/main/groovy/gaiden/DocumentBuilder.groovy
@@ -57,7 +57,9 @@ Document build(DocumentSource documentSource) {
     private List<PageReference> getPageReferences(DocumentSource documentSource) {
         if (Files.notExists(gaidenConfig.pagesFile)) {
             gaidenConfig.numbering = false
-            return generatePageReferencesFrom(documentSource)
+            gaidenConfig.add('configLessMode', true)
+            return Collections.emptyList()
+//            return generatePageReferencesFrom(documentSource)
         }

         def pagesParser = new PagesParser(sourceDirectory: gaidenConfig.sourceDirectory)
diff --git a/gaiden-core/src/test/resources/without-pages/build/1_first.html b/gaiden-core/src/test/resources/without-pages/build/1_first.html
index cdf8b11..b7cf65e 100644
--- a/gaiden-core/src/test/resources/without-pages/build/1_first.html
+++ b/gaiden-core/src/test/resources/without-pages/build/1_first.html
@@ -13,28 +13,18 @@
     <div class="wrapper">
       <div class="header">
         <i class="fa fa-bars sidebar-toggle"></i>
-        <span class="title"><a href="1_first.html">Gaiden</a></span>
+        <span class="title"><a href="#">Gaiden</a></span>
       </div>
       <div class="sidebar">
-        <ul>
-          <li class="unnumbered visible"><a href="1_first.html" data-alt-hash="first">First</a></li>
-          <li class="unnumbered visible">
-            <a href="2_second.html" data-alt-hash="second">Second</a>
-            <ul>
-              <li class="unnumbered visible"><a href="2_second/2_1_child.html" data-alt-hash="second-child">Second Child</a></li>
-            </ul>
-          </li>
-          <li class="unnumbered visible"><a href="3_third.html" data-alt-hash="third">Third</a></li>
-        </ul>
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/1_first.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/2_second/2_1_child.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/2_second.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/3_third.md
       </div>
       <div class="content">
         <div class="content-handle"></div>
         <div class="content-container">
           <div class="content-nav content-nav-top">
-            <a class="next-page" href="2_second.html">
-            Second
-            <i class="fa fa-angle-right"></i>
-            </a>
           </div>
           <div class="page-toc">
             <ul>
@@ -45,10 +35,6 @@
             <h1 id="first">First</h1>
           </div>
           <div class="content-nav content-nav-bottom">
-            <a class="next-page" href="2_second.html">
-            Second
-            <i class="fa fa-angle-right"></i>
-            </a>
           </div>
           <div class="footer">
             <p class="credit text-muted">Powered by <a href="https://github.com/kobo/gaiden">Gaiden</a></p>
diff --git a/gaiden-core/src/test/resources/without-pages/build/2_second.html b/gaiden-core/src/test/resources/without-pages/build/2_second.html
index 5b32e91..9a6a4b9 100644
--- a/gaiden-core/src/test/resources/without-pages/build/2_second.html
+++ b/gaiden-core/src/test/resources/without-pages/build/2_second.html
@@ -13,32 +13,18 @@
     <div class="wrapper">
       <div class="header">
         <i class="fa fa-bars sidebar-toggle"></i>
-        <span class="title"><a href="1_first.html">Gaiden</a></span>
+        <span class="title"><a href="#">Gaiden</a></span>
       </div>
       <div class="sidebar">
-        <ul>
-          <li class="unnumbered visible"><a href="1_first.html" data-alt-hash="first">First</a></li>
-          <li class="unnumbered visible">
-            <a href="2_second.html" data-alt-hash="second">Second</a>
-            <ul>
-              <li class="unnumbered visible"><a href="2_second/2_1_child.html" data-alt-hash="second-child">Second Child</a></li>
-            </ul>
-          </li>
-          <li class="unnumbered visible"><a href="3_third.html" data-alt-hash="third">Third</a></li>
-        </ul>
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/1_first.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/2_second/2_1_child.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/2_second.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/3_third.md
       </div>
       <div class="content">
         <div class="content-handle"></div>
         <div class="content-container">
           <div class="content-nav content-nav-top">
-            <a class="prev-page" href="1_first.html">
-            <i class="fa fa-angle-left"></i>
-            First
-            </a>
-            <a class="next-page" href="2_second/2_1_child.html">
-            Second Child
-            <i class="fa fa-angle-right"></i>
-            </a>
           </div>
           <div class="page-toc">
             <ul>
@@ -49,14 +35,6 @@
             <h1 id="second">Second</h1>
           </div>
           <div class="content-nav content-nav-bottom">
-            <a class="prev-page" href="1_first.html">
-            <i class="fa fa-angle-left"></i>
-            First
-            </a>
-            <a class="next-page" href="2_second/2_1_child.html">
-            Second Child
-            <i class="fa fa-angle-right"></i>
-            </a>
           </div>
           <div class="footer">
             <p class="credit text-muted">Powered by <a href="https://github.com/kobo/gaiden">Gaiden</a></p>
diff --git a/gaiden-core/src/test/resources/without-pages/build/2_second/2_1_child.html b/gaiden-core/src/test/resources/without-pages/build/2_second/2_1_child.html
index f0742eb..82acf2d 100644
--- a/gaiden-core/src/test/resources/without-pages/build/2_second/2_1_child.html
+++ b/gaiden-core/src/test/resources/without-pages/build/2_second/2_1_child.html
@@ -13,32 +13,18 @@
     <div class="wrapper">
       <div class="header">
         <i class="fa fa-bars sidebar-toggle"></i>
-        <span class="title"><a href="../1_first.html">Gaiden</a></span>
+        <span class="title"><a href="#">Gaiden</a></span>
       </div>
       <div class="sidebar">
-        <ul>
-          <li class="unnumbered visible"><a href="../1_first.html" data-alt-hash="first">First</a></li>
-          <li class="unnumbered visible">
-            <a href="../2_second.html" data-alt-hash="second">Second</a>
-            <ul>
-              <li class="unnumbered visible"><a href="2_1_child.html" data-alt-hash="second-child">Second Child</a></li>
-            </ul>
-          </li>
-          <li class="unnumbered visible"><a href="../3_third.html" data-alt-hash="third">Third</a></li>
-        </ul>
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/1_first.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/2_second/2_1_child.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/2_second.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/3_third.md
       </div>
       <div class="content">
         <div class="content-handle"></div>
         <div class="content-container">
           <div class="content-nav content-nav-top">
-            <a class="prev-page" href="../2_second.html">
-            <i class="fa fa-angle-left"></i>
-            Second
-            </a>
-            <a class="next-page" href="../3_third.html">
-            Third
-            <i class="fa fa-angle-right"></i>
-            </a>
           </div>
           <div class="page-toc">
             <ul>
@@ -46,17 +32,9 @@
             </ul>
           </div>
           <div class="main-content">
-            <h2 id="second-child">Second Child</h2>
+            <h1 id="second-child">Second Child</h1>
           </div>
           <div class="content-nav content-nav-bottom">
-            <a class="prev-page" href="../2_second.html">
-            <i class="fa fa-angle-left"></i>
-            Second
-            </a>
-            <a class="next-page" href="../3_third.html">
-            Third
-            <i class="fa fa-angle-right"></i>
-            </a>
           </div>
           <div class="footer">
             <p class="credit text-muted">Powered by <a href="https://github.com/kobo/gaiden">Gaiden</a></p>
diff --git a/gaiden-core/src/test/resources/without-pages/build/3_third.html b/gaiden-core/src/test/resources/without-pages/build/3_third.html
index c844cec..6375aa7 100644
--- a/gaiden-core/src/test/resources/without-pages/build/3_third.html
+++ b/gaiden-core/src/test/resources/without-pages/build/3_third.html
@@ -13,28 +13,18 @@
     <div class="wrapper">
       <div class="header">
         <i class="fa fa-bars sidebar-toggle"></i>
-        <span class="title"><a href="1_first.html">Gaiden</a></span>
+        <span class="title"><a href="#">Gaiden</a></span>
       </div>
       <div class="sidebar">
-        <ul>
-          <li class="unnumbered visible"><a href="1_first.html" data-alt-hash="first">First</a></li>
-          <li class="unnumbered visible">
-            <a href="2_second.html" data-alt-hash="second">Second</a>
-            <ul>
-              <li class="unnumbered visible"><a href="2_second/2_1_child.html" data-alt-hash="second-child">Second Child</a></li>
-            </ul>
-          </li>
-          <li class="unnumbered visible"><a href="3_third.html" data-alt-hash="third">Third</a></li>
-        </ul>
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/1_first.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/2_second/2_1_child.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/2_second.md
+        /Users/yamkazu/IdeaProjects/gaiden/gaiden-core/src/test/resources/without-pages/3_third.md
       </div>
       <div class="content">
         <div class="content-handle"></div>
         <div class="content-container">
           <div class="content-nav content-nav-top">
-            <a class="prev-page" href="2_second/2_1_child.html">
-            <i class="fa fa-angle-left"></i>
-            Second Child
-            </a>
           </div>
           <div class="page-toc">
             <ul>
@@ -45,10 +35,6 @@
             <h1 id="third">Third</h1>
           </div>
           <div class="content-nav content-nav-bottom">
-            <a class="prev-page" href="2_second/2_1_child.html">
-            <i class="fa fa-angle-left"></i>
-            Second Child
-            </a>
           </div>
           <div class="footer">
             <p class="credit text-muted">Powered by <a href="https://github.com/kobo/gaiden">Gaiden</a></p>
diff --git a/src/main/dist/themes/default/layouts/explorer.html b/src/main/dist/themes/default/layouts/explorer.html
new file mode 100644
index 0000000..fddde80
--- /dev/null
+++ b/src/main/dist/themes/default/layouts/explorer.html
@@ -0,0 +1,5 @@
+<%
+  document.pages.each { page ->
+    println page.source.pathe
+  }
+%>
\ No newline at end of file
diff --git a/src/main/dist/themes/default/layouts/sidebar.html b/src/main/dist/themes/default/layouts/sidebar.html
index 382fc07..ab3f4aa 100644
--- a/src/main/dist/themes/default/layouts/sidebar.html
+++ b/src/main/dist/themes/default/layouts/sidebar.html
@@ -1,3 +1,7 @@
 <div class="sidebar">
-    ${include('documentToc')}
+  <% if (config.configLessMode) { %>
+  ${include('explorer')}
+  <% } else { %>
+  ${include('documentToc')}
+  <% } %>
 </div>