Mercurial > irccd-www
changeset 21:0b664fc9fca7
Update for 2.2.0
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 26 Sep 2017 13:28:31 +0200 |
parents | f9e3094aca59 |
children | e49c41217e6e |
files | CMakeLists.txt download.md patch-index.patch templates/template-doc.html |
diffstat | 4 files changed, 257 insertions(+), 67 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Tue Apr 19 11:05:02 2016 +0200 +++ b/CMakeLists.txt Tue Sep 26 13:28:31 2017 +0200 @@ -22,9 +22,15 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${irccd-web_SOURCE_DIR}/cmake) find_package(Pandoc REQUIRED) +find_program(PATCH_COMMAND patch) + +if (NOT PATCH_COMMAND) + message(FATAL_ERROR "patch command required") +endif () # Some variables -set(URL http://releases.malikania.fr/irccd/irccd-2.0.1.tar.xz) +set(URL http://releases.malikania.fr/irccd/2.2.0/irccd-2.2.0.tar.xz) +set(URL_HASH SHA1=27ce16fa3cf25ff899819979594531416baf5563) set(TEMPLATE ${irccd-web_SOURCE_DIR}/templates/template.html) set(TEMPLATE_DOC ${irccd-web_SOURCE_DIR}/templates/template-doc.html) set(OUTPUT ${CMAKE_BINARY_DIR}/html) @@ -38,73 +44,83 @@ include(ExternalProject) ExternalProject_Add( - irccd - URL ${URL} - CMAKE_ARGS -DWITH_SSL=Off -DWITH_TESTS=Off -DWITH_DOXYGEN=Off -DWITH_DOCDIR=_DOCS_ - PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${TEMPLATE_DOC} ${IRCCD_SOURCE_DIR}/doc/html/resources/template.html - BUILD_COMMAND - COMMAND ${CMAKE_COMMAND} --build . --target docs - COMMAND ${CMAKE_COMMAND} --build . --target plugins - INSTALL_COMMAND "" - UPDATE_COMMAND "" - BINARY_DIR ${IRCCD_BINARY_DIR} - SOURCE_DIR ${IRCCD_SOURCE_DIR} + irccd + URL ${URL} + CMAKE_ARGS -DWITH_SSL=Off -DWITH_TESTS=Off -DWITH_DOXYGEN=Off -DWITH_DOCDIR=_DOCS_ + PATCH_COMMAND + COMMAND ${PATCH_COMMAND} -p1 < ${CMAKE_SOURCE_DIR}/patch-index.patch + COMMAND ${CMAKE_COMMAND} -E copy ${TEMPLATE_DOC} ${IRCCD_SOURCE_DIR}/doc/html/resources/template.html + BUILD_COMMAND + COMMAND ${CMAKE_COMMAND} --build . --target html + COMMAND ${CMAKE_COMMAND} --build . --target plugin-ask + COMMAND ${CMAKE_COMMAND} --build . --target plugin-auth + COMMAND ${CMAKE_COMMAND} --build . --target plugin-hangman + COMMAND ${CMAKE_COMMAND} --build . --target plugin-history + COMMAND ${CMAKE_COMMAND} --build . --target plugin-logger + COMMAND ${CMAKE_COMMAND} --build . --target plugin-plugin + COMMAND ${CMAKE_COMMAND} --build . --target plugin-roulette + INSTALL_COMMAND "" + UPDATE_COMMAND "" + BINARY_DIR ${IRCCD_BINARY_DIR} + SOURCE_DIR ${IRCCD_SOURCE_DIR} ) # Define the files to generate. set( - FILES - about - contribute - documentation - documentation - download - index - support - topics/versioning + FILES + about + contribute + download + index + support + topics/versioning ) # Arguments for specific files. set(index_VARS home:yes) foreach (f ${FILES}) - get_filename_component(OUTPUTDIR ${OUTPUT}/${f} DIRECTORY) - file(MAKE_DIRECTORY ${OUTPUTDIR}) - file(RELATIVE_PATH baseurl ${OUTPUTDIR} ${OUTPUT}) + get_filename_component(OUTPUTDIR ${OUTPUT}/${f} DIRECTORY) + file(MAKE_DIRECTORY ${OUTPUTDIR}) + file(RELATIVE_PATH baseurl ${OUTPUTDIR} ${OUTPUT}) - if (baseurl STREQUAL "") - set(baseurl "./") - endif () + if (baseurl STREQUAL "") + set(baseurl "./") + endif () - pandoc( - OUTPUT ${OUTPUT}/${f}.html - SOURCES ${SOURCE}/${f}.md - VARIABLE baseurl:${baseurl} ${${f}_VARS} - FROM markdown - TO html5 - ARGS --no-highlight - TEMPLATE ${TEMPLATE} - MAKE_DIRECTORY - ) + pandoc( + OUTPUT ${OUTPUT}/${f}.html + SOURCES ${SOURCE}/${f}.md + VARIABLE baseurl:${baseurl} ${${f}_VARS} + FROM markdown + TO html5 + ARGS --no-highlight + TEMPLATE ${TEMPLATE} + MAKE_DIRECTORY + ) - list(APPEND OUTPUTS ${OUTPUT}/${f}.html) - list(APPEND SOURCES ${SOURCE}/${f}.md) + list(APPEND OUTPUTS ${OUTPUT}/${f}.html) + list(APPEND SOURCES ${SOURCE}/${f}.md) endforeach () add_custom_target( - files - SOURCES ${SOURCES} ${TEMPLATE} ${TEMPLATE_DOC} ${CSS} ${JS} - DEPENDS ${OUTPUTS} + files + SOURCES ${SOURCES} ${TEMPLATE} ${TEMPLATE_DOC} ${CSS} ${JS} + DEPENDS ${OUTPUTS} ) +# +# In irccd, index.html is the file renamed to documentation.html on the +# web version. +# add_custom_target( - web - ALL - COMMENT "Generating website" - COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTPUT}/css - COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTPUT}/js - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/css ${OUTPUT}/css - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/js ${OUTPUT}/js - COMMAND ${CMAKE_COMMAND} -E copy_directory ${IRCCD_BINARY_DIR}/fakeroot/_DOCS_ ${OUTPUT} - DEPENDS files + web + ALL + COMMENT "Generating website" + COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTPUT}/css + COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTPUT}/js + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/css/ ${OUTPUT}/css + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/js/ ${OUTPUT}/js + COMMAND ${CMAKE_COMMAND} -E copy_directory ${IRCCD_BINARY_DIR}/fakeroot/_DOCS_/ ${OUTPUT} + DEPENDS files irccd )
--- a/download.md Tue Apr 19 11:05:02 2016 +0200 +++ b/download.md Tue Sep 26 13:28:31 2017 +0200 @@ -11,17 +11,8 @@ You can compile irccd from sources. <div class="btn-group" role="group" aria-label="..."> - <p><a class="btn btn-default btn-group-lg" href="http://releases.malikania.fr/irccd/2.0.2/irccd-2.0.2.tar.xz" role="button">irccd-2.0.2.tar.xz</a></p> - <p><a class="btn btn-default btn-group-lg" href="http://releases.malikania.fr/irccd/2.0.2/irccd-2.0.2.zip" role="button">irccd-2.0.2.zip</a></p> -</div> - -## Prebuilt binaries - -Prebuilt binaries are only provided for Windows. - -<div class="btn-group" role="group" aria-label="..."> - <p><a class="btn btn-default btn-group-lg" href="http://releases.malikania.fr/irccd/2.0.2/irccd-2.0.2-Windows-amd64.exe" role="button">irccd-2.0.2-Windows-amd64.exe</a></p> - <p><a class="btn btn-default btn-group-lg" href="http://releases.malikania.fr/irccd/2.0.2/irccd-2.0.2-Windows-x86.exe" role="button">irccd-2.0.2-Windows-x86.exe</a></p> + <p><a class="btn btn-default btn-group-lg" href="http://releases.malikania.fr/irccd/2.2.0/irccd-2.2.0.tar.xz" role="button">irccd-2.2.0.tar.xz</a></p> + <p><a class="btn btn-default btn-group-lg" href="http://releases.malikania.fr/irccd/2.2.0/irccd-2.2.0.zip" role="button">irccd-2.2.0.zip</a></p> </div> ## Development version @@ -34,10 +25,8 @@ ## GPG Signatures - - [irccd-2.0.2.tar.xz.asc](http://releases.malikania.fr/irccd/2.0.2/irccd-2.0.2.tar.xz.asc) - - [irccd-2.0.2.zip.asc](http://releases.malikania.fr/irccd/2.0.2/irccd-2.0.2.zip.asc) - - [irccd-2.0.2-Windows-amd64.exe.asc](http://releases.malikania.fr/irccd/2.0.2/irccd-2.0.2-Windows-amd64.exe.asc) - - [irccd-2.0.2-Windows-x86.exe.asc](http://releases.malikania.fr/irccd/2.0.2/irccd-2.0.2-Windows-x86.exe.asc) + - [irccd-2.2.0.tar.xz.asc](http://releases.malikania.fr/irccd/2.2.0/irccd-2.2.0.tar.xz.asc) + - [irccd-2.2.0.zip.asc](http://releases.malikania.fr/irccd/2.2.0/irccd-2.2.0.zip.asc) The files are signed by David Demelier, the public key is available [for download][Key]. @@ -50,4 +39,4 @@ ```` [Mercurial]: http://mercurial-scm.org -[Key]: http://www.demelierdavid.fr/files/keys/markand@malikania.fr.pub.asc \ No newline at end of file +[Key]: http://www.demelierdavid.fr/files/keys/markand@malikania.fr.pub.asc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patch-index.patch Tue Sep 26 13:28:31 2017 +0200 @@ -0,0 +1,172 @@ +diff -r 2fd2e15872c6 cmake/function/IrccdBuildHtml.cmake +--- a/cmake/function/IrccdBuildHtml.cmake Tue Sep 26 12:34:43 2017 +0200 ++++ b/cmake/function/IrccdBuildHtml.cmake Tue Sep 26 13:06:26 2017 +0200 +@@ -112,7 +112,7 @@ + set(parents " -\n") + set(parents "${parents} active: true\n") + set(parents "${parents} name: \"Home\"\n") +- set(parents "${parents} path: \"${baseurl}index.html\"\n") ++ set(parents "${parents} path: \"${baseurl}documentation.html\"\n") + + set(path "${baseurl}") + foreach (p ${parentlist}) +diff -r 2fd2e15872c6 doc/html/CMakeLists.txt +--- a/doc/html/CMakeLists.txt Tue Sep 26 12:34:43 2017 +0200 ++++ b/doc/html/CMakeLists.txt Tue Sep 26 13:06:26 2017 +0200 +@@ -20,7 +20,7 @@ + + set( + HTML_SOURCES +- ${html_SOURCE_DIR}/index.md ++ ${html_SOURCE_DIR}/documentation.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 +diff -r 2fd2e15872c6 doc/html/documentation.md +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/doc/html/documentation.md Tue Sep 26 13:06:26 2017 +0200 +@@ -0,0 +1,70 @@ ++--- ++header: "Irccd documentation" ++guide: true ++--- ++ ++Welcome to the irccd documentation. ++ ++# Building ++ ++Everything you need to build irccd. ++ ++ - [Build from sources](build/build-from-sources.html) ++ - [Build options](build/build-options.html) ++ ++# Configuring & running ++ ++## General topics ++ ++Read the following sections to understand the configuration file format and in ++which directories they are located. ++ ++ - [Paths](irccd/paths.html) ++ - [Configuration file syntax](misc/configuration-syntax.html) ++ ++## Irccd ++ ++Configure and run `irccd` daemon. ++ ++ - [Configure irccd](irccd/configuring.html) ++ - [Irccd command line usage](irccd/usage.html) ++ ++## Irccdctl ++ ++Everything about the `irccdctl` utility. ++ ++ - [Configure irccdctl](irccdctl/configuring.html) ++ - [Irccdctl command line usage](irccdctl/usage.html) ++ - [List of irccdctl commands](irccdctl/command/index.html) ++ ++# Plugins ++ ++Documentation about official irccd plugins. ++ ++ - [ask](plugin/ask.html) ++ - [auth](plugin/auth.html) ++ - [hangman](plugin/hangman.html) ++ - [history](plugin/history.html) ++ - [logger](plugin/logger.html) ++ - [plugin](plugin/plugin.html) ++ - [roulette](plugin/roulette.html) ++ ++# Development ++ ++Development of plugins and other development documentation. ++ ++ - [Javascript plugin introduction](dev/plugin-javascript-introduction.html) ++ - [Network protocol](dev/socket-protocol.html) ++ - [Network commands](dev/socket-commands.html) ++ ++# Plugin API ++ ++The official Javascript API. ++ ++ - [Javascript API](api/index.html) ++ ++# Miscellaneous ++ ++Miscellaneous documentation. ++ ++ - [Common patterns and formatting](misc/common-patterns-and-formatting.html) +diff -r 2fd2e15872c6 doc/html/index.md +--- a/doc/html/index.md Tue Sep 26 12:34:43 2017 +0200 ++++ /dev/null Thu Jan 01 00:00:00 1970 +0000 +@@ -1,70 +0,0 @@ +---- +-header: "Irccd documentation" +-guide: true +---- +- +-Welcome to the irccd documentation. +- +-# Building +- +-Everything you need to build irccd. +- +- - [Build from sources](build/build-from-sources.html) +- - [Build options](build/build-options.html) +- +-# Configuring & running +- +-## General topics +- +-Read the following sections to understand the configuration file format and in +-which directories they are located. +- +- - [Paths](irccd/paths.html) +- - [Configuration file syntax](misc/configuration-syntax.html) +- +-## Irccd +- +-Configure and run `irccd` daemon. +- +- - [Configure irccd](irccd/configuring.html) +- - [Irccd command line usage](irccd/usage.html) +- +-## Irccdctl +- +-Everything about the `irccdctl` utility. +- +- - [Configure irccdctl](irccdctl/configuring.html) +- - [Irccdctl command line usage](irccdctl/usage.html) +- - [List of irccdctl commands](irccdctl/command/index.html) +- +-# Plugins +- +-Documentation about official irccd plugins. +- +- - [ask](plugin/ask.html) +- - [auth](plugin/auth.html) +- - [hangman](plugin/hangman.html) +- - [history](plugin/history.html) +- - [logger](plugin/logger.html) +- - [plugin](plugin/plugin.html) +- - [roulette](plugin/roulette.html) +- +-# Development +- +-Development of plugins and other development documentation. +- +- - [Javascript plugin introduction](dev/plugin-javascript-introduction.html) +- - [Network protocol](dev/socket-protocol.html) +- - [Network commands](dev/socket-commands.html) +- +-# Plugin API +- +-The official Javascript API. +- +- - [Javascript API](api/index.html) +- +-# Miscellaneous +- +-Miscellaneous documentation. +- +- - [Common patterns and formatting](misc/common-patterns-and-formatting.html)
--- a/templates/template-doc.html Tue Apr 19 11:05:02 2016 +0200 +++ b/templates/template-doc.html Tue Sep 26 13:28:31 2017 +0200 @@ -106,6 +106,19 @@ </div><!-- Side bar --> <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 --> + </div> + + <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> <!-- Page body for JavaScript --> $if(js)$ <!-- Page header, may be: event | module | function | method -->