I recently changed the URLs of some R Markdown websites, and I am trying to create a nice-looking 404.Rmd
to alert users to the changes. Using this version of my personal website, when I navigate to an invalid URL like https://wlandau.github.io/abc/
, the 404 page renders correctly.
But when I try a more complicated URL like https://wlandau.github.io/abc/123.html
, the browser is blank, possibly because key resources fail to load.
Could relative paths like these be the problem? rmarkdown::render_site()
automatically generates them.
<link href="site_libs/font-awesome-5.1.0/css/all.css" rel="stylesheet"/>
<link href="site_libs/font-awesome-5.1.0/css/v4-shims.css" rel="stylesheet"/>
<script src="site_libs/headroom-0.9.4/headroom.min.js"></script>
<script src="site_libs/autocomplete-0.37.1/autocomplete.min.js"></script>
<script src="site_libs/fuse-6.4.1/fuse.min.js"></script>
When I revert to a bare bones 404.html in this commit, the page loads properly, but it does not look nearly as nice.