From 53ed6d7d1e678d7486337ce67a2f17b30bac21ac Mon Sep 17 00:00:00 2001 From: nodiscc Date: Thu, 26 Jan 2017 18:52:54 +0100 Subject: Generate HTML documentation using MkDocs (WIP) MkDocs is a static site generator geared towards building project documentation. Documentation source files are written in Markdown, and configured with a single YAML file. * http://www.mkdocs.org/ * http://www.mkdocs.org/user-guide/configuration/ Ref. #312 * remove pandoc-generated HTML documentation * move markdown doc to doc/md/, * mkdocs.yml: * generate HTML doc in doc/html * add pages TOC/ordering * use index.md as index page * Makefile: remove execute permissions from generated files * Makefile: rewrite htmlpages GFM to markdown conversion using sed: awk expression aslo matched '][' which causes invalid output on complex links with images or code blocks * Add mkdocs.yml to .gitattributes, exclude this file from release archives * Makefile: rename: htmldoc -> doc_html target * run make doc: pull latest markdown documentation from wiki * run make htmlpages: update html documentation --- doc/Create-and-serve-multiple-Shaarlis-(farm).md | 58 ------------------------ 1 file changed, 58 deletions(-) delete mode 100644 doc/Create-and-serve-multiple-Shaarlis-(farm).md (limited to 'doc/Create-and-serve-multiple-Shaarlis-(farm).md') diff --git a/doc/Create-and-serve-multiple-Shaarlis-(farm).md b/doc/Create-and-serve-multiple-Shaarlis-(farm).md deleted file mode 100644 index a71f6520..00000000 --- a/doc/Create-and-serve-multiple-Shaarlis-(farm).md +++ /dev/null @@ -1,58 +0,0 @@ -#Create and serve multiple Shaarlis (farm) -Example bash script (creates multiple shaarli instances and generates an HTML index of them) - -```bash -#!/bin/bash -set -o errexit -set -o nounset - -#config -shaarli_base_dir='/var/www/shaarli' -accounts='bob john whatever username' -shaarli_repo_url='https://github.com/shaarli/Shaarli' -ref="master" - -#clone multiple shaarli instances -if [ ! -d "$shaarli_base_dir" ]; then mkdir "$shaarli_base_dir"; fi[](.html) - -for account in $accounts; do - if [ -d "$shaarli_base_dir/$account" ];[](.html) - then echo "[info] account $account already exists, skipping";[](.html) - else echo "[info] creating new account $account ..."; git clone --quiet "$shaarli_repo_url" -b "$ref" "$shaarli_base_dir/$account"; fi[](.html) -done - -#generate html index of shaarlis -htmlhead=' - - - - - My Shaarli farm - - - -
-

My Shaarli farm

- -
- -' - - - -for account in $accounts; do accountlinks="$accountlinks\n
  • $account
  • "; done -if [ -d "$shaarli_base_dir/index.html" ]; then echo "[removing old index.html]"; rm "$shaarli_base_dir/index.html" ]; fi[](.html) -echo "[info] generating new index of shaarlis"[](.html) -echo -e "$htmlhead $accountlinks $htmlfooter" > "$shaarli_base_dir/index.html" -echo '[info] done.'[](.html) -echo "[info] list of accounts: $accounts"[](.html) -echo "[info] contents of $shaarli_base_dir:"[](.html) -tree -a -L 1 "$shaarli_base_dir" -``` - -This script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like [Ansible](https://www.ansible.com/)[](.html) -- cgit v1.2.3