Add keywords to a topic for HTML outputs


In HTML based outputs, keywords can be added to a topic to provide logical search terms or words that might not be included in the text. For example, a book contains a topic on assembling a piece of equipment. By adding relevant keywords to the topic, a search using assemble, installing, or setup can still find the appropriate topic even though these words have not been used in the procedure.

The keywords are added to the topic's source file during publishing by resolving the <and any Index Entries pointing to the topic are used as the keywords for the topic.

Required: The body_template.htm file must contain the keywords meta name entry.

Use Index Entries to create keywords

To use Index Entries to add keywords to your topic, the book you are publishing must contain an Index which is set to build from index entries and topic headings.

Build Index from Index Entries and Topic Headings

In the Index you can create an Index Entry (pointing to the topic) for each keyword you want to include. In this example three keywords have been added - Assemble, Installing, and Setup. Each of the Index Entry objects point to the topic "Assembling Your Teleportation Device".

Using Index Entries to Add Keywords

During publishing the keywords are added to the topic's meta data in the head section. These can be viewed by opening the .htm file created for the topic. The keywords are not visible in the topic.

Keywords Resolved in Published Topic

Making the topic's keywords visible

If the keywords need to be visible in the topic you can use the SYS_KEYWORDS variable in a custom HTML publishing template. The variable must be defined using a namespace declaration, so it is added to the template using the format <authorit:SYS_KEYWORDS>.

If both the <meta name="keywords" content=""> element and <authorit: SYS_KEYWORDS> are found in the template, then <authorit: SYS_KEYWORDS> is given precedence, and the <meta name="keywords" content=""> element is not resolved.

The custom HTML template is created with the normal head and body sections. The body section must include a placeholder to add the content from the topic; use the placeholder <aitdata>. Add the custom HTML template to the Media object used by the topic (open the Media object's Web tab then link to the file in the "Use this HTML template instead of settings below" field).

Custom Body_Template HTML File