# Building a website with Publican

Publican not only builds documents for publication but can build and manage a documentation website as well. For a suite of documents that you maintain by yourself, you can use Publican to build a site on your local system; you can then upload the site to a webserver by whatever means you choose. This approach does not scale well, however, so for team-based documentation projects, Publican can generate RPM packages of documentation to install on the webserver. To install Publican-generated RPM packages on a webserver, Publican (version 2.1 or higher) and rpm must be installed on the server. If you build and maintain the website on a workstation and upload it to a webserver for publication, Publican and rpm do not need to be installed on the webserver.

The websites that Publican creates consist of four parts: the website structure, a home page, product and version description pages, and the documents published on the site. The website structure itself consists of:

- a configuration file.

- an SQLite database file.

- a subdirectory for the published documents, which contains:

  - `index.html` — an index page that redirects to localized versions of a home page for the site.

  - `interactive.css` — a CSS stylesheet that contains styles for the navigation menu.

  - `opds.xml` — an Open Publication Distribution System (OPDS) catalog to allow compliant eBook readers to find EPUB documents on your site easily.

  - `Sitemap` — A Sitemap is a list of the URLs from your website and metadata about them, like update history, change frequency, and importance relative to other URLs in the site. A Sitemap can be supplied to many major search engines, where it is used to help their crawlers index your site more intelligently. A Sitemap does not guarantee that your site will be ranked higher in search results. However, it does help search engines to return the most relevant results from your website in response to user queries. For more information on Sitemaps, visit sitemaps.org.

  - `site_overrides.css` — a CSS stylesheet that overrides the styles contained in `interactive.css` to provide site-specific styles. This file is not created by the site creation process, but must be added manually later, or supplied by the site home page.

  - `defualt.js` — a JavaScript script that directs visitors to localized content based on the locale set in their browser and which controls the presentation of the navigation menu.

  - subdirectories for each language in which you publish. Initially, this contains `opds.xml` and `toc.html`. Later it also contains `opds-product.xml`:

    - `opds.xml` — an OPDS catalog of EPUB documents in this language.

    - `opds-product.xml` — an OPDS catalog of EPUB documents for each product for which you publish documentation in this language. Within each product catalog, documentation is divided into `<category>`s for different versions of the same product.

    - `toc.html` — the table of contents for that language, initially without links to any documents.

    - A subdirectory for each product for which you publish documentation in this language.

Optionally, the site structure might also include a dump file — an XML file that provides complete site content details for delivery of other services, such as web feeds or customised search pages. The site structure might also contain a zipped version of the dump file. Refer to and for details of creating a dump file, and to for a description of the dump file contents.

## Building a website manually

## Building a website using RPM packages

## Submitting Your Sitemap to Search Engines

A Publican website includes an XML Sitemap file. The Sitemap can be submitted to many major search engines, in order to help them index your website more intelligently and thoroughly. Each search engine has its own submission procedure. This section includes documentation on how to submit a Sitemap to Google and Bing.

### Submitting Your Sitemap to Google.

#### To Submit Your Sitemap to Google:

1. Sign up for a Google account at Google Webmaster Tools. If you already have a Google account, you can use it.

2. Sign in to your Google Webmaster Tools account at this URL: http://www.google.com/webmasters/tools/home.

3. First you must verify you are the owner of your Publican site. Click the Add A Site button.

4. A dialog box is displayed for you to Add a site with. Enter the URL of your Publican site in the text entry field and click Continue.

5. Follow the instructions that display and upload the HTML file that Google provides to the document root of your website.

6. When you have confirmed that the provided HTML file has been uploaded to the required location by accessing it in a web browser, click the Verify button.

7. When you have successfully verified the ownership of your Publican website to Google, return to the Webmaster Tools home page. Your Publican site is listed. Click on it.

8. You are taken to the Webmaster Tools configuration page for your Publican site. On the left side of the page there is a menu. Click on the Site configuration menu entry to expand it. Its expanded contents includes a Sitemaps entry. Click it.

9. You are taken to a Sitemap submission page. Click the Submit a Sitemap button.

10. A text entry field displays, including the base URL of your Publican site, with room to enter the URL of your Sitemap XML file. Enter its location and click the Submit Sitemap button. The details of the Sitemap are displayed in a table.

11. #### Result

    The Sitemap for your Publican site has been successfully submitted to Google.

### Submitting Your Sitemap to Bing.

#### To Submit Your Sitemap to Bing:

1. Sign up for a Bing Webmaster Tools account at Bing Webmaster Tools. If you already have a Windows LiveID account, you can use it.

2. Sign in to your Bing Webmaster Tools account at this URL: http://www.bing.com/toolbox/webmaster/.

3. Click the Add Site button.

4. The Add Site dialog box is displayed. Enter the URL of your Publican site in the text entry field and click Submit.

5. The Verify Ownership dialog displays, with three options. Follow the instructions given when the Option 1: Place an XML file on your web server has been expanded. Upload the BingSiteAuth.xml file that Bing provides to the document root of your website.

6. When you have confirmed that the provided BingSiteAuth.xml file has been uploaded to the required location by accessing it in a web browser, click the Verify button.

7. When you have successfully verified your ownership of your Publican website to Bing, return to the Bing Webmaster Tools home page. Your Publican site is listed. Click on it.

8. Select the Crawl tab.

9. Select Sitemaps and then Add Feed.

10. The Add Feed dialog displays. Enter the URL of your Sitemap file and click Submit. The details of the Sitemap are displayed.

11. #### Result:

    The Sitemap for your Publican site has been successfully submitted to Bing.