changeset 421:5e9b7ff956b3

Docs: reduce index.md and improve breadcrumb, closes #623
author David Demelier <markand@malikania.fr>
date Thu, 02 Feb 2017 13:42:12 +0100
parents f1414576ceaa
children 186864e9f131
files cmake/function/IrccdBuildHtml.cmake doc/html/CMakeLists.txt doc/html/api/event/index.md doc/html/api/module/index.md doc/html/build/index.md doc/html/dev/index.md doc/html/irccd/index.md doc/html/irccdctl/index.md doc/html/misc/index.md doc/html/resources/template.html
diffstat 10 files changed, 11 insertions(+), 122 deletions(-) [+]
line wrap: on
line diff
--- a/cmake/function/IrccdBuildHtml.cmake	Sun Jan 29 13:42:20 2017 +0100
+++ b/cmake/function/IrccdBuildHtml.cmake	Thu Feb 02 13:42:12 2017 +0100
@@ -110,13 +110,19 @@
     # Create a list of parents for the breadcrumb widget.
     string(REPLACE "/" ";" parentlist "${dirname}")
     set(parents "  -\n")
-    set(parents "${parents}    name: \"index\"\n")
+    set(parents "${parents}    active: true\n")
+    set(parents "${parents}    name: \"Home\"\n")
     set(parents "${parents}    path: \"${baseurl}index.html\"\n")
 
     set(path "${baseurl}")
     foreach (p ${parentlist})
         set(path "${path}${p}/")
         set(parents "${parents}  -\n")
+
+        if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dirname}/${path}index.md)
+            set(parents "${parents}    active: true\n")
+        endif ()
+
         set(parents "${parents}    name: \"${p}\"\n")
         set(parents "${parents}    path: \"${path}index.html\"\n")
     endforeach ()
--- a/doc/html/CMakeLists.txt	Sun Jan 29 13:42:20 2017 +0100
+++ b/doc/html/CMakeLists.txt	Thu Feb 02 13:42:12 2017 +0100
@@ -21,7 +21,6 @@
 set(
     HTML_SOURCES
     ${html_SOURCE_DIR}/index.md
-    ${html_SOURCE_DIR}/api/module/index.md
     ${html_SOURCE_DIR}/api/module/Irccd.Directory/index.md
     ${html_SOURCE_DIR}/api/module/Irccd.Directory/Irccd.Directory.remove.md
     ${html_SOURCE_DIR}/api/module/Irccd.Directory/Irccd.Directory.mkdir.md
@@ -113,7 +112,6 @@
     ${html_SOURCE_DIR}/api/module/Irccd.Util/Irccd.Util.format.md
     ${html_SOURCE_DIR}/api/module/Irccd.Util/Irccd.Util.splituser.md
     ${html_SOURCE_DIR}/api/index.md
-    ${html_SOURCE_DIR}/api/event/index.md
     ${html_SOURCE_DIR}/api/event/onWhois.md
     ${html_SOURCE_DIR}/api/event/onMessage.md
     ${html_SOURCE_DIR}/api/event/onPart.md
@@ -137,17 +135,13 @@
     ${html_SOURCE_DIR}/api/event/onQuery.md
     ${html_SOURCE_DIR}/build/build-from-sources.md
     ${html_SOURCE_DIR}/build/build-options.md
-    ${html_SOURCE_DIR}/build/index.md
-    ${html_SOURCE_DIR}/dev/index.md
     ${html_SOURCE_DIR}/dev/plugin-javascript-introduction.md
     ${html_SOURCE_DIR}/dev/socket-commands.md
     ${html_SOURCE_DIR}/dev/socket-protocol.md
     ${html_SOURCE_DIR}/irccd/configuring.md
-    ${html_SOURCE_DIR}/irccd/index.md
     ${html_SOURCE_DIR}/irccd/paths.md
     ${html_SOURCE_DIR}/irccd/usage.md
     ${html_SOURCE_DIR}/irccdctl/configuring.md
-    ${html_SOURCE_DIR}/irccdctl/index.md
     ${html_SOURCE_DIR}/irccdctl/usage.md
     ${html_SOURCE_DIR}/irccdctl/command/index.md
     ${html_SOURCE_DIR}/irccdctl/command/help.md
@@ -176,7 +170,6 @@
     ${html_SOURCE_DIR}/irccdctl/command/watch.md
     ${html_SOURCE_DIR}/misc/common-patterns-and-formatting.md
     ${html_SOURCE_DIR}/misc/configuration-syntax.md
-    ${html_SOURCE_DIR}/misc/index.md
 )
 
 set(
--- a/doc/html/api/event/index.md	Sun Jan 29 13:42:20 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
----
-js: true
----
-
-# Supported events
-
-  - [onChannelMode](onChannelMode.html)
-  - [onChannelNotice](onChannelNotice.html)
-  - [onCommand](onCommand.html)
-  - [onConnect](onConnect.html)
-  - [onInvite](onInvite.html)
-  - [onJoin](onJoin.html)
-  - [onLoad](onLoad.html)
-  - [onMe](onMe.html)
-  - [onMessage](onMessage.html)
-  - [onMode](onMode.html)
-  - [onNames](onNames.html)
-  - [onNick](onNick.html)
-  - [onNotice](onNotice.html)
-  - [onPart](onPart.html)
-  - [onQuery](onQuery.html)
-  - [onQueryCommand](onQueryCommand.html)
-  - [onReload](onReload.html)
-  - [onTopic](onTopic.html)
-  - [onUnload](onUnload.html)
-  - [onWhois](onWhois.html)
--- a/doc/html/api/module/index.md	Sun Jan 29 13:42:20 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
----
-js: true
----
-
-# Javascript modules
-
-  - [Irccd](Irccd/index.html)
-  - [Irccd.Directory](Irccd.Directory/index.html)
-  - [Irccd.ElapsedTimer](Irccd.ElapsedTimer/index.html)
-  - [Irccd.File](Irccd.File/index.html)
-  - [Irccd.Logger](Irccd.Logger/index.html)
-  - [Irccd.Plugin](Irccd.Plugin/index.html)
-  - [Irccd.Server](Irccd.Server/index.html)
-  - [Irccd.System](Irccd.System/index.html)
-  - [Irccd.Timer](Irccd.Timer/index.html)
-  - [Irccd.Unicode](Irccd.Unicode/index.html)
-  - [Irccd.Util](Irccd.Util/index.html)
--- a/doc/html/build/index.md	Sun Jan 29 13:42:20 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
----
-title: "Building"
-header: "Building"
-guide: yes
----
-
-- [Build from sources](build/build-from-sources.html)
-- [Build options](build/build-options.html)
--- a/doc/html/dev/index.md	Sun Jan 29 13:42:20 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
----
-title: "Development"
-header: "Development"
-guide: yes
----
-
-  - [Javascript plugin introduction](plugin-javascript-introduction.html)
-  - [Network protocol](socket-protocol.html)
-  - [Network commands](socket-commands.html)
--- a/doc/html/irccd/index.md	Sun Jan 29 13:42:20 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
----
-title: "Irccd"
-header: "Irccd"
-guide: yes
----
-
-  - [Paths](paths.html)
-  - [Configure irccd](configuring.html)
--- a/doc/html/irccdctl/index.md	Sun Jan 29 13:42:20 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
----
-title: "Irccdctl"
-header: "Irccdctl"
-guide: yes
----
-
-# General documentation
-
-  - [Configure irccdctl](configuring.html)
-  - [Irccdctl command line usage](usage.html)
-
-# List of support commands
-
-  - [help](command/help.html)
-  - [plugin-config](command/plugin-config.html)
-  - [plugin-info](command/plugin-info.html)
-  - [plugin-list](command/plugin-list.html)
-  - [plugin-load](command/plugin-load.html)
-  - [plugin-reload](command/plugin-reload.html)
-  - [plugin-unload](command/plugin-unload.html)
-  - [server-cmode](command/server-cmode.html)
-  - [server-cnotice](command/server-cnotice.html)
-  - [server-connect](command/server-connect.html)
-  - [server-disconnect](command/server-disconnect.html)
-  - [server-invite](command/server-invite.html)
-  - [server-join](command/server-join.html)
-  - [server-kick](command/server-kick.html)
-  - [server-list](command/server-list.html)
-  - [server-me](command/server-me.html)
-  - [server-message](command/server-message.html)
-  - [server-mode](command/server-mode.html)
-  - [server-nick](command/server-nick.html)
-  - [server-notice](command/server-notice.html)
-  - [server-part](command/server-part.html)
-  - [server-reconnect](command/server-reconnect.html)
-  - [server-topic](command/server-topic.html)
-  - [watch](command/watch.html)
--- a/doc/html/misc/index.md	Sun Jan 29 13:42:20 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
----
-title: "Miscellaneous"
-header: "Miscellaneous"
-guide: yes
----
-
-  - [Common patterns and formatting](common-patterns-and-formatting.html)
-  - [Configuration file syntax](configuration-syntax.html)
--- a/doc/html/resources/template.html	Sun Jan 29 13:42:20 2017 +0100
+++ b/doc/html/resources/template.html	Thu Feb 02 13:42:12 2017 +0100
@@ -34,7 +34,6 @@
     <div class="col-sm-1 col-md-2 sidebar">
     <!-- Side bar for JavaScript -->
 $if(js)$
-      <a href="$baseurl$api/index.html"><h3>Home</h3></a>
       <h3>Events</h3>
       <ul class="nav nav-sidebar sidebar-list">
         <li><a href="$baseurl$api/event/onChannelMode.html">onChannelMode</a></li>
@@ -87,7 +86,11 @@
     <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
       <ol class="breadcrumb">
 $for(parents)$
+        $if(parents.active)$
         <li><a href="$parents.path$">$parents.name$</a></li>
+        $else$
+        <li>$parents.name$</li>
+        $endif$
 $endfor$
         <li class="active">$basename$</li>
       </ol><!-- !breadcrumb -->