One way to completely exclude content from online output is to place condition tags on the topic files and include or exclude them from the targets
Let's say your target points to a TOC that includes Topic A, Topic B, and Topic C. If you generate an online output and use this option in the Target Editor, all three of those topics will be included in the output. In addition, Topic D will be included in the output. Although Topic D is not found in the TOC, a cross-reference to it is found in Topic B; therefore, it is linked to the TOC (and the target) indirectly. However, Topic E is not included in the output, because it is not found in the TOC and none of the topics to be included in the output contain a link to it.
Let's say you have four topics in your project: Topic A, Topic B, Topic C, and Topic D.
Topic A, Topic B, and Topic C have been included in your TOC. Topic D has not been included, and it does not contain any links to or from any other topics.
Furthermore, let's say you want to use the "list-of" proxy feature to automatically generate a list of all H2 headings in the project
So what happens when you generate the output?
If the "Exclude…" target option is not enabled in the target, all four topics will be included in the output. In addition, the generated list of H2 headings will show heading text from all four of those topics.
However, if the "Exclude…" target option is enabled, only Topic A, Topic B, and Topic C will be included in the output. This also means that the generated list of H2 headings will show heading text only from those three topics. The H2 heading text from Topic D will not be included.
Let's say your primary target explicitly links to the following.
- A TOC
- A browse sequence
- A stylesheet
- One or more glossary files
- A master page
- A startup topic
A target can also link explicitly to one or more relationship tables and one alias file. However, these files are not used to determine whether files should be included when this "Exclude…" target option is enabled.
- The TOC and the browse sequence can link to topics, other TOCs, or other browse sequences. These files would then be included. You could even place a link to multimedia from a TOC or browse sequence if you wanted (although this cannot be done in the Flare user interface). It will work and those explicitly linked resources would also be included.
- A stylesheet may link to image resources. These resources are included.
- A glossary file may link explicitly to a topic if a term uses a topic as its definition. These topics are included.
- A master page may link to a topic or resource (image/multimedia). These linked items would be included.
- The startup topic is, of course, included.
- Any included topic can explicitly link to additional topics via hyperlinks, cross-references, image maps, or related topics controls (not concept links or keyword links).
Using this option can help prevent bloated output by excluding unused files.
Let's say you have 1000 images in your project, but only 500 of them are used in the Microsoft HTML Help output you want to generate. By using this feature, only those 500 images are included in the output, thus keeping the output file size down to a minimum.
- Open a target used for online output.
- On the Advanced tab of the Target Editor, select Exclude content not linked directly or indirectly from the target.
- Click to save your work.