Fix preview helper
Fix slug in Document.as_link