<?xml version="1.0" encoding="UTF-8"?>

<!--
  - Licensed to the Apache Software Foundation (ASF) under one or more
  - contributor license agreements.  See the NOTICE file distributed with
  - this work for additional information regarding copyright ownership.
  - The ASF licenses this file to You under the Apache License, Version 2.0
  - (the "License"); you may not use this file except in compliance with
  - the License.  You may obtain a copy of the License at
  -
  -     http://www.apache.org/licenses/LICENSE-2.0
  -
  - Unless required by applicable law or agreed to in writing, software
  - distributed under the License is distributed on an "AS IS" BASIS,
  - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - See the License for the specific language governing permissions and
  - limitations under the License.
  -
  - $Id$
  -->

<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "document-v13.dtd">

<!--
  - Version: $Revision$ $Date$
  - Author: Vadim Gritsenko (vgritsenko@apache.org)
  -->
<document>
  <header>
    <title>How to update Xindice Website</title>
    <version>$Revision$</version>
    <authors>
      <person name="Vadim Gritsenko" email="vgritsenko@apache.org"/>
    </authors>
  </header>

  <body>
    <section>
      <title>Overview</title>
      <p>
        This document is intended to familiarize Xindice committers with website
        update procedure.
      </p>
      <p>
        Xindice website documentation is written in XML documents and published
        to the web by <link href="http://forrest.apache.org/">Apache Forrest</link>.
        To update website, follow these simple steps:
      </p>
      <ul>
        <li>Get Forrest.</li>
        <li>Get <code>xml-site</code>.</li>
        <li>Build website.</li>
        <li>Commit to <link href="http://svn.apache.org/repos/asf/xml/site/targets/xindice/">xml-site</link>.</li>
        <li>Sync people.apache.org.</li>
        <li>Done!</li>
      </ul>
      <p>
        These steps are covered in more details below. We assume that you already have xml-xindice
        checkout at <code>~/projects/xml-xindice</code>.
      </p>
    </section>

    <section>
      <title>Getting Forrest</title>
      <p>
        In the <code>~/projects</code> directory, execute:
      </p>
      <source>
  $ svn co http://svn.apache.org/repos/asf/forrest/branches/forrest_08_branch/ forrest-0.8.x
  $ cd forrest-0.8.x/main
  $ build.sh</source>
      <p>
        After process is completed, you should see <code>BUILD SUCCESSFUL</code> message.
      </p>
    </section>

    <section>
      <title>Getting <code>xml-site</code></title>
      <p>
        In the <code>~/projects</code> directory, execute:
      </p>
      <source>
  $ svn co http://svn.apache.org/repos/asf/xml/site/ xml-site</source>
      <p>
        You can find html version of current Xindice website in <code>/targets/xindice</code>
        directory.
      </p>
    </section>

    <section>
      <title>Building Website</title>
      <p>
        In the xml-xindice directory, execute:
      </p>
      <source>
  $ ~/projects/forrest-0.8.x/bin/forrest</source>
      <p>
        This will create html website at <code>build/site/</code>. Check results with the browser
        before proceeding.
      </p>
    </section>

    <section>
      <title>Committing Website</title>
      <p>
        In the xml-xindice directory, execute:
      </p>
      <source>
  $ cp -r build/site/* ../xml-site/targets/xindice/
  $ # Review results:
  $ svn st ../xml-site/targets/xindice/
  $ # svn add, if necessary
  $ # svn diff, to verify changes
  $ svn ci ../xml-site/targets/xindice/</source>
    </section>

    <section>
      <title>Syncing Website</title>
      <p>
        Once website is checked in, it needs to be updated on people.apache.org machine:
      </p>
      <source>
  $ ssh &lt;yourname&gt;@people.apache.org
  $ cd /www/xml.apache.org/xindice/
  $ svn up</source>
    </section>

    <section>
      <title>Done!</title>
      <p>
        Approximately in 4 hours (or less), your updates will appear at
        <link href="http://xml.apache.org/xindice"><code>http://xml.apache.org/xindice</code></link>.
      </p>
    </section>

  </body>
</document>
