Why does my custom CSS (custom.css
) work correctly on my personal website after deploying to Netlify but fail to apply when serving the site locally with blogdown::serve_site()
in RStudio or browser? Initially, the styles load, but after navigating pages, they reset. The CSS is correctly linked in baseof.html
as follows:
<link rel="stylesheet" href="https://xxx/libs/bootstrap/5.2.0/css/bootstrap.min.css" integrity="sha512-XWTT" crossorigin="anonymous" />
<link rel="stylesheet" href="{{ "custom.css" | relURL }}">
The file is placed in the static/
folder, Hugo is updated to the lastest. The issue occurs in both RStudio 2023.06 and 2024.12 .
What could be causing the CSS to fail in live reload?"
Last but not least, this matter remains after I deleted "bootstrap.min.css".