Author-it: Change date on published HTML files to the Last Modified date from Author-it
filed in AuthorIT, Technical Writing on Dec.19, 2007
This VB script sets the date on each topic to the last modified date from the Author-it database.
- Add this comment to the top of the HTML template that generates your topics:
<!–
Topic
<pagetitle>
<authorit:SYS_MODIFIED>
–> - Add _SetLastModifiedDatesOnFiles.vbs to the list of additional files on your book or media object.
- Then add
wscript _SetLastModifiedDatesOnFiles.vbs
to your AfterPublish.bat.
- I also recommend adding
del _SetLastModifiedDatesOnFiles.vbs
to the AfterPublish.bat at the end to kill the file from the final output.
One word of caution: if an embedded topic’s content is changed, I don’t believe the modified date of the topic that contains the embedded topic is updated, as that topic only includes a reference to the embedded topic. So I think you could easily get new content with an old date. If that could pose problems for you, test well.
Leave a Reply