I suppose this would be technically possible, though depending on your needs (like if it is just JS) it may be easier to conditionalize a single head html. The export scripts are meant to be fairly generic and operate across different .hype documents, so if you need specific head HTML on your document this would be overkill vs. simply modifying the HTML after export. I’ll also note that each scene can have its own set of layouts, so they aren’t a document-level construct (though Hype does try to make it easy since the common use case is each scene having the same layouts).
So that said, if what you’re going to be making is pretty generic, then the mechanism you’d probably want to use in the Export Script is in looking at the file from the
export_info_json_path argument in the final
modify_staging_path call. This is a JSON file which contains keys
main_container_height. If you’re using advanced export and using the per-layout exports, then these will be different for each layout and you can conditionalize on the size. There’s existing code in the sample export script to insert into the head, so you can simply choose what you want added there.
Hope that helps!