(создана русская версия страницы, перевод в процессе) |
No edit summary |
||
Line 1: | Line 1: | ||
{{autolang}} | |||
{{Template:draft}} | {{Template:draft}} | ||
Line 9: | Line 10: | ||
==Подготовка== | ==Подготовка== | ||
<!-- Use <ol> and <li> so we can embed <pre> inside --> | <!-- Use <ol> and <li> so we can embed <pre> inside --> | ||
{{admon/warning| | {{admon/warning|На сегодняшний день (июль 2010г.) известно о проблеме Publican, не позволяющей публиковать документы, если язык системы отличается от en-US. Если используется другой язык, перезапустите сеанс, выбрав en-US в качестве языка интерфейса.}} | ||
<ol><li> | <ol><li>Создайте локальную копию репозитория git сайта docs.fedoraproject.org: | ||
<pre>git clone ssh://USERNAME@git.fedorahosted.org/git/docs/web.git</pre> | <pre>git clone ssh://USERNAME@git.fedorahosted.org/git/docs/web.git</pre> | ||
Где '''''USERNAME''''' -- имя пользователя FAS. | |||
{{admon/note | | {{admon/note | Большой объем загрузки | Загрузка всех файлов может занять некоторое время даже при наличии быстрого соединения.}}</li> | ||
<li>Change into the directory into which you downloaded the '''web.git''' repo, and make a copy of '''homepage.tmp''' named '''homepage.cfg''': | <li>Change into the directory into which you downloaded the '''web.git''' repo, and make a copy of '''homepage.tmp''' named '''homepage.cfg''': | ||
<pre>cp homepage.tmp homepage.cfg</pre></li> | <pre>cp homepage.tmp homepage.cfg</pre></li> | ||
Line 32: | Line 33: | ||
{{admon/warning|If you are publishing draft documentation, be sure to follow the instructions described at [[Publishing draft documentation]] first.}} | {{admon/warning|If you are publishing draft documentation, be sure to follow the instructions described at [[Publishing draft documentation]] first.}} | ||
<ol><li> | <ol><li>Обновите локальную копию docs.fedoraproject.org: | ||
<pre>git pull</pre></li> | <pre>git pull</pre></li> | ||
Line 39: | Line 40: | ||
where '''''LANGUAGE_CODES''''' is a comma-separated list of the languages in which you want to publish this document. </li> | where '''''LANGUAGE_CODES''''' is a comma-separated list of the languages in which you want to publish this document. </li> | ||
<li> | <li>Перейдите в каталог '''publish''' и проверьте подкаталоги документов. В частности, убедитесь, что: | ||
* | * в качестве продукта указана '''Fedora''' (обратите внимание на заглавную букву); | ||
* | * версия верна; | ||
* | * название документа верно. Обратите внимание на заглавные буквы и пробелы. Так, например, '''Foo Guide''' не эквивалентно '''foo-guide'''</li> | ||
<li>Install the book to the Fedora website: | <li>Install the book to the Fedora website: |
Revision as of 06:26, 29 July 2010
Начиная с версии Publican 2.0, возможна автоматизированная публикация документов на сайте Fedora.
Требования
Чтобы получить доступ к функциям публикации документов, необходимо:
- вступить в группу docs-publishers;
- создать локальную копию книги, загрузив ее из GIT или SVN.
Подготовка
- Создайте локальную копию репозитория git сайта docs.fedoraproject.org:
git clone ssh://USERNAME@git.fedorahosted.org/git/docs/web.git
Где USERNAME -- имя пользователя FAS.
- Change into the directory into which you downloaded the web.git repo, and make a copy of homepage.tmp named homepage.cfg:
cp homepage.tmp homepage.cfg
- Edit the homepage.cfg file to provide the absolute paths to the fedoradocs.db file and the public_html directory. For example, if you downloaded the web.git repo to the fedoradocs subdirectory of your home directory, your homepage.cfg file might look like:
# Config::Simple 4.59 # Tue May 11 13:53:03 2010 db_file: /home/jsmith/fedoradocs/web/fedoradocs.db toc_path: /home/jsmith/fedoradocs/web/public_html
- Make sure you have the latest version of Publican and the Fedora brand package. As root, run:
yum update publican publican-fedora
Публикация документа
- Обновите локальную копию docs.fedoraproject.org:
git pull
- 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. - Перейдите в каталог publish и проверьте подкаталоги документов. В частности, убедитесь, что:
- в качестве продукта указана Fedora (обратите внимание на заглавную букву);
- версия верна;
- название документа верно. Обратите внимание на заглавные буквы и пробелы. Так, например, Foo Guide не эквивалентно foo-guide
- 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. - 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
Удаление документа
Для удаления документа из списка опубликованных для русского языка выполните следующее:
- Update your copy of the docs.fedoraproject.org website. In the directory where you keep your local copy of the site, run:
git pull
- 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. - Перейдите в локальный каталог документа и выполните:
git add . git commit -m "DESCRIPTION_OF_YOUR_CHANGES" git push
- Publican can only remove the local files and directories on your system, not their record in Git. To remove the deleted files from your local Git repo, run:
for f in $(git ls-files --deleted); do git rm $f; done
Then push these changes to the remote repo:
git commit -m"rm unused files" git push
Обновление документа
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 run publican install_book, as if you were installing it for the first time. Publican automatically replaces the old version with the new one.