Make document.js compatible with /, i.e. the root/homepage