include("site.inc"); $template = new Page; $template->initCommon(); $template->displayHeader(); ?>
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.
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.
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}
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
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/
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
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.
To test the changes in your sandbox, open a web browser
and point it at
http://docs.localhost.localdomain/
.
Always Test Changes | |
---|---|
Do not proceed further until you test all changes. Check that all links and index pages work. |
To push your new content to the web site, follow this procedure:
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
Commit the changes to CVS. Use a message that describes the document being committed.
cvs ci -m 'message about document
' foobar-tutorial/
Tag the content LIVE
in
CVS.
cvs tag -F LIVE foobar-tutorial/