From Fedora Project Wiki

(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...')
 
Line 25: Line 25:
 
1. Change to the directory where you keep a checked-out copy of the document that you want to publish, then run:
 
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'''''
+
:'''publican build --embedtoc --publish --formats epub,html,html-single,pdf --langs ''LANGUAGE_CODES'''''
  
where '''''LANGUAUGE_CODES''''' is a comma-separated list of the languages in which you want to publish this document.  
+
where '''''LANGUAGE_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:
 
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:
Line 36: Line 36:
 
3. Install the book to the Fedora website:
 
3. Install the book to the Fedora website:
  
:'''publican install_book --site_config ''PATH_TO_SITE_CONFIG_FILE'' --lang ''LANGUAUGE_CODE'''''
+
:'''publican install_book --site_config ''PATH_TO_SITE_CONFIG_FILE'' --lang ''LANGUAGE_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.
+
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 '''''LANGUAGE_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:
+
4. Change to the directory in which you keep your local copy of the site and run:
 
: '''git add .'''
 
: '''git add .'''
 
: '''git commit -m"''DESCRIPTION_OF_YOUR_CHANGES''"'''
 
: '''git commit -m"''DESCRIPTION_OF_YOUR_CHANGES''"'''
 
: '''git push'''
 
: '''git push'''
 +
 +
==Removing a document==
 +
To remove a document for a particular version of Fedora in a particular language:
 +
 +
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 remove, then run:
 +
 +
:'''publican remove_book --site_config ''PATH_TO_SITE_CONFIG_FILE'' --lang ''LANGUAGE_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 '''''LANGUAGE_CODE''''' is the language in which you are removing the document. Note that you can only run '''publican remove_book''' for one language at a time.
 +
 +
2. Change to the directory in which you keep your local copy of the site and run:
 +
: '''git add .'''
 +
: '''git commit -m"''DESCRIPTION_OF_YOUR_CHANGES''"'''
 +
: '''git push'''
 +
 +
==Updating a document==
 +
To update a document previously published in a particular language for a particular version of Fedora, change into the directory in which you keep a checked-out copy of the document, then follow the steps to remove the old document, followed by the steps to add a new document. In brief, you will run:
 +
: '''publican remove_book'''
 +
: '''publican build'''
 +
: '''publican install_book'''
 +
  
 
[[Category:Docs Project]]
 
[[Category:Docs Project]]

Revision as of 14:15, 24 May 2010

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 LANGUAGE_CODES

where LANGUAGE_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 LANGUAGE_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 LANGUAGE_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 directory in which you keep your local copy of the site and run:

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

Removing a document

To remove a document for a particular version of Fedora in a particular language:

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 remove, then run:

publican remove_book --site_config PATH_TO_SITE_CONFIG_FILE --lang LANGUAGE_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 LANGUAGE_CODE is the language in which you are removing the document. Note that you can only run publican remove_book for one language at a time.

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

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

Updating a document

To update a document previously published in a particular language for a particular version of Fedora, change into the directory in which you keep a checked-out copy of the document, then follow the steps to remove the old document, followed by the steps to add a new document. In brief, you will run:

publican remove_book
publican build
publican install_book