publish: detect and prevent duplicate publishes of the same page

for #84