Warning — This procedure replaces files
/var/www/html/docs
directory. Existing files in this directory might be overwritten by this procedure.
$
sudo yum install publican publican-common-web
/etc/publican-website.cfg
file to specify the name of the site, the web host, and optionally, search parameters, default language, dump file settings, and web style for the site:
title
parameter, for example:
title: "Foomaster Documentation"
host
parameter as a full URL, including the protocol (for example, http://
). For example:
host: http://docs.example.com
host
to construct the URLs in the XML Sitemap
that it creates for search engine crawlers, and to limit searches submitted through the search box in the navigation menu to results on your site only.
<form>
with the search
parameter. If you do not specify a custom web search, Publican creates a Google search limited to the host that you specified in the host
parameter.
docs.example.com
, set:
search: '<form target="_top" method="get" action="http://search.yahoo.com/search"> <div class="search"> <input type="text" name="p" value="" /> <input type="hidden" name="vs" value="docs.example.com" /> <input type="submit" value="###Search###" /> </div> </form>'
value="###Search###"
in the code for a submit button, Publican uses the word Search
on the button, localized into any language that Publican supports.
Important — the search parameter is not validated
search
parameter, but builds the value of this parameter into the navigation menu exactly as you specify it. Be especially careful when you use this feature.
def_lang
with a language code. For example:
def_lang: fr-FR
def_lang
set to fr-FR
, visitors viewing the navigation menu in (for example) Spanish are presented with a link to the original French version of the document if the document has not yet been translated into Spanish.
$
publican update_site
command is run. Configure the dump
, dump_file
, and zip_dump
parameters as follows:
dump
dump: 1
to enable the dump file function. This parameter defaults to 0
(off).
dump_file
dump_file: name
to specify the name of the dump file and the directory in which Publican stores it. This parameter defaults to /var/www/html/DUMP.xml
.
zip_dump
zip_dump: 1
to specify that Publican should create a zipped version of the XML file together with the XML version. This parameter defaults to 0
(off).
web_style
.
Important
web_style: 2
for your website, you need to have web_style: 2
set in each of the books that you want to install on the site. Consider setting this parameter in the defaults.cfg
or overrides.cfg
files of the brands that you intend to use with this site.
manual_toc_update
parameter, for example:
manual_toc_update: 1
$
publican update_site
command.
toc_js
parameter, for example:
toc_js: "mybrand/scripts/megafoo.js"
toc_path
/toc.js with the $
publican update_site
command. This path should be relative to the toc_path
parameter.
site_overrides.css
. If you want to use site-specific styles to override those provided by interactive.css
, you can add a site_overrides.css
to the document that provides the site home page — refer to Section 7.1.2, “Creating, installing, and updating the home page”. If you do not want to use site-specific styles, the empty file you add here will prevent 404 errors on your server. On a Linux system, run:
#
touch /var/www/html/docs/site_overrides.css
$
publican update_site
<article>
with an extra web_type: home
parameter in its publican.cfg
file. In its structure and its presentation, the home page is the same as any other article that you produce with Publican and is packaged the same way.
$
publican package --binary
/tmp/rpms/noarch/
directory of the home page. By default, Publican builds the RPM package for the operating system within which you are running Publican. To build an RPM package to install on a server that runs a different operating system, set the os_ver
parameter in the home page's publican.cfg
file.
rpm -i
or yum localinstall
command, or place the package in a repository and configure the webserver to install from that repository when you run yum install
.
<edition>
number or <pubsnumber>
in the Article_Info.xml
. Publican uses these values to set the version and release numbers for the RPM package. When you install this package on your webserver, yum can replace the old version with the new when you run yum localinstall
for a local package, or yum update
for a package fetched from a repository.
<article>
s with an extra web_type: product
or web_type: version
parameter in their publican.cfg
files. In their structure and presentation, product pages and version pages are the same as any other article that you produce with Publican and are packaged the same way.
$
publican package --binary
/tmp/rpms/noarch/
directory of the product page or version page. By default, Publican builds the RPM package for the operating system within which you are running Publican. To build an RPM package to install on a server that runs a different operating system, set the os_ver
parameter in the publican.cfg
file of the product page or version page.
rpm -i
or yum localinstall
command, or place the package in a repository and configure the webserver to install from that repository when you run yum install
.
<edition>
number or <pubsnumber>
in the Article_Info.xml
. Publican uses these values to set the version and release numbers for the RPM package. When you install this package on your webserver, yum can replace the old version with the new when you run yum localinstall
for a local package, or yum update
for a package fetched from a repository.
$
publican package --binary --lang language_code
/tmp/rpms/noarch/
directory of the document. By default, Publican builds the RPM package for the operating system within which you are running Publican. To build an RPM package to install on a server that runs a different operating system, set the os_ver
parameter in the document's publican.cfg
file.
rpm -i
or yum localinstall
command, or place the packages in a repository and configure the webserver to install from that repository when you run yum install
.
<edition>
number or <pubsnumber>
in the Book_Info.xml
or Article_Info.xml
. Publican uses these values to set the version and release numbers for the RPM package. When you install this package on your webserver, yum can replace the old version with the new when you run yum localinstall
for a local package, or yum update
for a package fetched from a repository.
rpm -e
or yum erase
command.
manual_toc_update
parameter in the site's configuration file. With this parameter set, you must run the $
publican update_site
command after installing, updating, or removing documents. Refer to Section 7.1.1, “Creating the website structure” for more information.