% var aTopicList: THndTopicsInfoArray; nCurTopic, nCurParent, nCurKeyword, nTopicKind, nHeaderKind, nFooterKind: integer; sTopicHeader, sTopicFooter, sTopicContent, sRelativeTopic: string; aBreadCrumb: array of String; aTopicKeywords: array of string; begin // Need BOM for UTF8 files HndGeneratorInfo.BOMOutput := True; // Output global CSS content HndGeneratorInfo.CurrentFile := 'css\hnd.css'; print(HndProjects.GetProjectCssContent()); // Clear search data HndJsSearchEngine.ClearSearchData(); // Each individual topics... aTopicList := HndTopicsEx.GetTopicListGenerated(False, False); for nCurTopic := 0 to length(aTopicList) - 1 do begin // Notify about the topic being generated HndGeneratorInfo.CurrentTopic := aTopicList[nCurTopic].id; // Topic kind nTopicKind := HndTopics.GetTopicKind(HndGeneratorInfo.CurrentTopic); if (nTopicKind = 1) then continue; // Empty topic: do not generate anything // Setup the file name HndGeneratorInfo.CurrentFile := aTopicList[nCurTopic].HelpId + '.html'; // Topic header nHeaderKind := HndTopics.GetTopicHeaderKind(HndGeneratorInfo.CurrentTopic); sTopicHeader := HndTopics.GetTopicHeaderTextCalculated(HndGeneratorInfo.CurrentTopic); // Topic footer nFooterKind := HndTopics.GetTopicFooterKind(HndGeneratorInfo.CurrentTopic); sTopicFooter := HndTopics.GetTopicFooterTextCalculated(HndGeneratorInfo.CurrentTopic); // Topic content sTopicContent := HndTopics.GetTopicContentAsHtml(HndGeneratorInfo.CurrentTopic); // Add Search data HndJsSearchEngine.AddSearchData( sTopicHeader, HndGeneratorInfo.CurrentTopic ); HndJsSearchEngine.AddSearchData( HtmlToText(sTopicContent), HndGeneratorInfo.CurrentTopic ); HndJsSearchEngine.AddSearchData( sTopicFooter, HndGeneratorInfo.CurrentTopic ); // Create the breadcrumb SetLength(aBreadCrumb, 0); if HndGeneratorInfo.GetCustomSettingValue('ShowBreadCrumbs') then begin sRelativeTopic := HndTopics.GetTopicParent(HndGeneratorInfo.CurrentTopic); while (sRelativeTopic <> '') and (sRelativeTopic <> HndTopics.GetProjectTopic()) do begin SetLength(aBreadCrumb, Length(aBreadCrumb) + 1); aBreadCrumb[Length(aBreadCrumb) - 1] := sRelativeTopic; sRelativeTopic := HndTopics.GetTopicParent(sRelativeTopic); end; end; // Associated Keywords aTopicKeywords := HndTopicsKeywords.GetKeywordsAssociatedWithTopic(HndGeneratorInfo.CurrentTopic); %>