initCommon(); $template->displayHeader(); ?>

7.3. Creating a New Publication

7.3.1. General Guidelines

Follow these guidelines to ensure maintainability and ease of use for all publishers.

  • Use a short, descriptive name for the document directory. The module name from its Docs CVS location is usually appropriate. Good examples include install-guide/ or example-tutorial/.

  • Under the document directory, include a branch directory if the document references specific features of a particular Fedora release.

  • Under the branch directory (or document directory if no branches are necessary), make at least a en_US/ directory. Make an additional directory for each locale that has been fully translated.

7.3.2. Adding Content

To add content, follow the procedure below. The following commands show an example of adding content for a new document called the Foobar Tutorial. This document includes a translation for the "zz_XX" locale and follows specifics of each Fedora release.

  1. Make the required directory structure.

    cd ~/fedora/web/html/docs/
    mkdir foobar-tutorial
    mkdir foobar-tutorial/f7
    mkdir foobar-tutorial/f7/{en_US,zz_XX}
  2. Build the HTML version of each translation of the document from Docs CVS.

    cd ~/my-docs/foobar-tutorial/F-7/
    make html-en_US html-zz_XX
  3. Copy the HTML content to the web sandbox.

    cd ~/fedora/web/html/docs/foobar-tutorial/f7/
    cp -r ~/my-docs/foobar-tutorial/F-7/foobar-tutorial-en_US/ en_US/
    cp -r ~/my-docs/foobar-tutorial/F-7/foobar-tutorial-zz_XX/ zz_XX/
  4. Convert the HTML in each directory to PHP using the provided docbookhtml2php.py script.

    cd en_US/
    ~/fedora/web/scripts/docbookhtml2php.py *html && rm -f *html
    cd ../zz_XX/
    ~/fedora/web/scripts/docbookhtml2php.py *html && rm -f *html
  5. Create any necessary index.php files for the overall directories. Each document and branch directory must have an index.php file directing users to appropriate content. In this example, the necessary files are foobar-tutorial/index.php and foobar-tutorial/f7/index.php. You do not need to write these files from scratch. Copy an existing file from another document, and change it as needed to suit the new document.

    Depending on content, publication may include changing a higher-level index.php file.

  6. To test the changes in your sandbox, open a web browser and point it at http://docs.localhost.localdomain/.

    [Important] Always Test Changes

    Do not proceed further until you test all changes. Check that all links and index pages work.

7.3.3. Pushing Content to the Web

To push your new content to the web site, follow this procedure:

  1. Add all the new file content to CVS.

    cd ~/fedora/web/html/docs/
    cvs add foobar-tutorial
    cd foobar-tutorial
    cvs add f7
    cd f7
    cvs add en_US/ zz_XX/
    cvs add en_US/*php en_US/stylesheet-images/
    cvs add zz_XX/*php zz_XX/stylesheet-images/
    cvs add en_US/stylesheet-images/*png
    cvs add zz_XX/stylesheet-images/*png
    cd ../../
    cvs add foobar-tutorial/index.php
    cvs add foobar-tutorial/f7/index.php
    
  2. Commit the changes to CVS. Use a message that describes the document being committed.

    cvs ci -m 'message about document' foobar-tutorial/
  3. Tag the content LIVE in CVS.

    cvs tag -F LIVE foobar-tutorial/
displayFooter('$Date: 2008/04/10 02:37:06 $'); ?>