anchor.diff:  
   image::Render Documents.png[]
   
  -=== Sequence for viewing documents
  +=== The setup process for Jenkins and git hook combo
   
  -This is just the standard way of accessing a web site. The html page served by the web server will be the latest generated html page.
  -
  -image::View Documents.png[]
  -
  -== Server requirements
  -
  -The server that will render the documents need the following tools installed:
  -
  - * git
  - * giblish
  -
  -The server that runs Jenkins will (of course) need Jenkins installed.
  -
  -=== Setup server for both Jenkins and doc rendering on Ubuntu 16.04
  -
  -The easiest setup is to use the same server to run Jenkins and to render the documents. For an Ubuntu 16.04 installation, you can install the needed tools as follows:
  -
  - * install git `sudo apt install git`
  - * install Jenkins See https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04[this doc].
  - * install giblish `sudo gem install giblish`
  -
  -
  -== server side git hooks
  -
  -git supports hooks in several parts of the sequence of getting changes ommitted and pushed to a remote repo. For details on git hooks see https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks[this doc]. See <<post-update-hook>> An example of a `post-update` hook that triggers Jenkins
  -
  +bla bla ö
   
   [appendix]
   [[post-update-hook]]
  
positive.code: stylesheet setup::
  The template scripts assume that the the css used to style the generated HTML is located under `<repo_root>/scripts/resources/css` and is called `giblish.css`. To enable a styling of your liking, either create this folder/css file in your repo at that exact place or tweak the `html_publish.sh` script to use another location/css file name for the styling.
  
  
  == Deploy using Jenkins
  
  This setup adds a Jenkins (or similar build orchestrator) installation so it is more to setup but is more 'production friendly'.
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  .Deploy using Jenkins
  image::deploy_with_jenkins.svg[]
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  == Toolchain
  
   * git
   * giblish
   * git server side hooks to kick-off the document rendering after a git push.
   * a web server to publish the rendered html documents.
  ö* a tool that can execute scripts after a git push. *Jenkins* is used in this instruction. Some advantages over calling giblish directly from a git hook:
   ** the document rendering is asynchronous to the git push from the client.
   ** the script executed by Jenkins (the 'pipeline' in Jenkis lingo) can be stored and versioned in the same git repo as the documents to be rendered.
  
  === Sequence for rendering documents
  
  
negative.code: Below is an example of a `post-update` hook that triggers Jenkins jobs after a push to a git repo. This hook should be installed on the server side git repository to trigger Jenkins builds
  
  .Example of a git hook triggering Jenkins builds
  [source,bash]
  ----
  include::../docgen/scripts/githook_examples/post-update.example[]
  ----
  