# Creating, installing, and updating the home page

The Publican-generated home page is the localizable page to which visitors are directed by the site JavaScript and which provides the style for the website structure. The home page is structured as a DocBook `<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. To create the home page:

1. Change into a convenient directory and run the following $ `publican create` command:

       $ publican create --type Article --name page_name

   For example:

       $ publican create --type Article --name Home_Page

   Most brands (including the `common` brand) present the name of the document in large, coloured letters close to the top of the page, underneath the banner that contains the product name (the `--name` option sets the `<title>` tag). Therefore, by default, the value that you set with the `--name` option is presented prominently to visitors to your site; in the above example, visitors are greeted with the words `Home Page` underneath the product banner.

2. Change into the article directory:

       $ cd page_name

   For example:

       $ cd Home_Page

3. Unlink the `Article_Info.xml` file from your root XML file.

   Little of the content of the `Article_Info.xml` file is likely to be useful for the home page of your website. Therefore, edit the root XML file of your home page to remove the `<xi:include>` tag that links to `Article_Info.xml`. Publican still uses the information in `Article_Info.xml` for packaging, but does not include it on the page itself.

4. Edit the `publican.cfg` file.

   At the very least, you must add the `web_type` parameter and set it to `home`:

       web_type: home

   The `web_type: home` parameter instructs Publican to process this document differently from product documentation. This is the only mandatory change to the `publican.cfg` file. Other optional changes to the `publican.cfg` file that are frequently useful for Publican-generated websites include:

   `brand`

     To style your home page to match your documents, add:

         brand: name_of_brand

   `docname`
   `product`

     If the `<title>` or the `<product>` that you set in the `Article_Info` file included anything other than basic, unaccented Latin characters, set the `docname` and `product` as necessary.

5. Edit the content of the `page_name.xml` file (for example, `Home_Page.xml`) as you would any other DocBook document.

   If you remove the `<xi:include>` that links to `Article_Info.xml`, specify a title for your page in the following format:

       <title role="producttitle">FooMaster Documentation</title>

6. If you publish documentation in more than one language, create a set of POT files and a set of PO files for each language with the $ `publican update_pot` and `publican update_po` commands.

7. To customize the logo at the top of the navigation menu that provides a link back to the home page, create a PNG image 290 px × 100 px and name it `web_logo.png`. Place this image in the `images/` directory in the document's XML directory, for example `en-US/images/`.

8. To specify site-specific styles to override the styles set in the website's `interactive.css` file, add styles to a file named `site_overrides.css` and place it in the root of your document source (the same directory that contains `publican.cfg` and the language directories).

9. Build the home page in single-page HTML format with the `--embedtoc` option and install it in your website structure. For example:

       $ publican build --publish --formats html-single --embedtoc --langs all
       $ publican install_book --site_config ~/docsite/foomaster.cfg --lang Language_Code

   Note that you can build all languages at the same time, but must install the home page for each language with a separate $ `publican install_book` command.