implement Document.title based on either config value or first headline