I have been having a problem with snippet (.hts) files being included in the generated Webhelp folder. The snippet files are not needed in the generated output and I can delete them manually and the help displays correctly. But I can't figure out how to stop them from generating in the first place. At one point they appeared as baggage files. I delete the baggage files and duplicated the snippets with a different name. But they keep appearing in the generated output folder. It doesn't happen with all the snippets in my project; only a couple of them. Probably the last two I created. Any ideas on how to stop this from happening?
Are you generating or publishing. Generating is supposed to clear the target folder while publishing is not.
If you are generating, I would nonetheless first try manually deleting the target folder and generating again.
Let us know if that works.
Do the snippets include a link to a bookmark?
I have a scenario where I use a snippet in several places in one topic, which includes a link to a specific heading in that topic, so it includes something like <a href="#SpecificHeading">Specific Heading</a>.
And that snippet is being copied into the output in the assets folder. I think it only happens when linking to a bookmark without specifying a filename as well. But I do need to do some further testing.
(btw, thanks for posting the question and forcing me to look into it more closely. I've been suffering fatigue from all the new weird bugs in NewUI. I was comfortable with the old weird bugs in Classic. 😛 )
I tried deleting the output folder, then generating the Webhelp again. The .hts file (snippet) still gets included.
The snippet does have a link to a heading in the same topic. I will see if changing the link to include the filename makes a difference.
So far the problem seems to be fixed. I changed the hyperlink in the snippet that only pointed to a # and now it has the filename also. But I also had to delete another baggage file for the snipppet; would like to know what caused that to be made - maybe the hyperlink issue? Anyway, I fixed the link, deleted the baggage file, then shut down RH, deleted the .cpd file, and deleted the output folder. Restarted RH and generated again - no .hts in the output now. I tried again and still no .hts file. Let's hope it continues! Thanks to you both for your suggestions.
Are you saying that you had a link to a snippet file and that was in baggage? You don't link to snippet files. You link to topics where they are used or to bookmarks within the topic. Snippets are source files, not output files.
The snippet had hyperlinks inside it...they linked to other topics. But there were no links to the snippet itself. I don't know where the baggage file was coming from. I didn't make it. I thought maybe RoboHelp made it because one of the hyperlinks in the snippet had only a # link instead of filename#.
OK but without it everything is still working. Correct?
Yes, so far it's working. The snippet is not being generated with the output and there is no mystery baggage file being created. And the help works correctly.