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 --- ...installation-over-SSH-and-serve-it-locally.html | 165 --------------------- 1 file changed, 165 deletions(-) delete mode 100644 doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html (limited to 'doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html') diff --git a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html b/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html deleted file mode 100644 index d6b76add..00000000 --- a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - Shaarli – Copy an existing installation over SSH and serve it locally - - - - - - -
- -
-

Copy an existing installation over SSH and serve it locally

-

Example bash script:

-
#!/bin/bash
-#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli
-#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.
-#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli
-#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed
-#Usage: ./local-shaarli.sh
-#Author: nodiscc (nodiscc@gmail.com)
-#License: MIT (http://opensource.org/licenses/MIT)
-set -o errexit
-set -o nounset
-
-##### CONFIG #################
-#The port used by php's local server
-php_local_port=7431
-
-#Name of the SSH server and path where Shaarli is installed
-#TODO: pass these as command-line arguments
-remotehost="my.ssh.server"
-remote_shaarli_dir="/var/www/shaarli"
-
-
-###### FUNCTIONS #############
-_main() {
-    _CBSyncShaarli
-    _CBServeShaarli
-}
-
-_CBSyncShaarli() {
-    remote_temp_dir=$(ssh $remotehost mktemp -d)
-    remote_ssh_user=$(ssh $remotehost whoami)
-    ssh -t "$remotehost" sudo cp -r "$remote_shaarli_dir" "$remote_temp_dir"
-    ssh -t "$remotehost" sudo chown -R "$remote_ssh_user":"$remote_ssh_user" "$remote_temp_dir"
-    scp -rq "$remotehost":"$remote_temp_dir" local-shaarli
-    ssh "$remotehost" rm -r "$remote_temp_dir"
-}
-
-_CBServeShaarli() {
-    #TODO: allow serving a previously downloaded Shaarli
-    #TODO: ask before overwriting local copy, if it exists
-    cd local-shaarli/
-    php -S localhost:${php_local_port}
-    echo "Please go to http://localhost:${php_local_port}"
-}
-
-
-##### MAIN #################
-
-_main
-

This outputs:

-
$ ./local-shaarli.sh
-PHP 5.6.0RC4 Development Server started at Mon Sep  1 21:56:19 2014
-Listening on http://localhost:7431
-Document root is /home/user/local-shaarli/shaarli
-Press Ctrl-C to quit.
-
-[Mon Sep  1 21:56:27 2014] ::1:57868 [200]: /[](.html)
-[Mon Sep  1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
-[Mon Sep  1 21:56:37 2014] ::1:57881 [200]: /...[](.html)
- - -- cgit v1.2.3