From Fedora Project Wiki

Revision as of 13:41, 24 May 2010 by Rlandmann (talk | contribs) (Created page with 'The forthcoming '''Publican 2.0''' includes features to automate publishing documents to websites. As of May 2010, Publican 2.0 is still under development, but RPMs for...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The forthcoming Publican 2.0 includes features to automate publishing documents to websites. As of May 2010, Publican 2.0 is still under development, but RPMs for a beta version, Publican 1.99, are available.

Preparation

0.1 Create a local copy of the git repository of the docs.fedoraproject.org website:

git clone ssh://USERNAME@git.fedorahosted.org/git/docs/web.git

Where USERNAME is your FAS username

0.2 Download the publican-1.99 and publican-website-1.99 packages from http://rlandmann.fedorapeople.org/publican and save them to your system.

0.3 Install the publican-1.99 and publican-website-1.99 packages. In the directory where you saved the packages in step 0.2, become root and run:

yum localinstall publican-1.99* publican-website-1.99* --nogpgcheck

Publishing a new document

Warning.png
Publican now controls the directory structure and the SQLite database that manages the site and its tables of contents. Do not add or remove directories from the directory tree manually as we did in the past.

These instructions apply to documents that have not been published in this version in this language before, even if the same document was published for an earlier version of Fedora or has already been published for the current version of Fedora in other languages.

0. Update your copy of the docs.fedoraproject.org website. In the directory where you keep your local copy of the site, run:

git pull

1. Change to the directory where you keep a checked-out copy of the document that you want to publish, then run:

publican build --embedtoc --publish --formats epub,html,html-single,pdf --langs LANGUAUGE_CODES

where LANGUAUGE_CODES is a comma-separated list of the languages in which you want to publish this document.

2. Browse to the publish subdirectory and to the documents themselves inside it to ensure that the documents have built as you expected. In particular, verify:

  • the product name is Fedora (note capitalization)
  • the version number is correct
  • the document title is properly capitalized and spaced: for example, Foo Guide, not foo-guide

3. Install the book to the Fedora website:

publican install_book --site_config PATH_TO_SITE_CONFIG_FILE --lang LANGUAUGE_CODE

where PATH_TO_SITE_CONFIG_FILE is the path to the homepage.cfg file in your local copy of the docs.fedoraproject.org website, and LANGUAUGE_CODE is the language in which you are publishing the document. Note that you can only run publican install_book for one language at a time.

4. Change to the director in which you keep your local copy of the site and run:

git add .
git commit -m"DESCRIPTION_OF_YOUR_CHANGES"
git push