Aufheben
Aufheben

Reputation: 857

Hosting a static site with Yesod

I'm experimenting with Yesod and I've created a simple scaffolding site with yesod. I've downloaded a bootstrap template site and wish to simply host this site with yesod. The template site has an index.html and a bunch of css and js files. This seemly simple task has baffled me. By my understanding, the site should be placed under the 'static' directory, I tried to use sendFile to send the index.html file in getHomeR, but only the content of the that file is displayed, without the css and js. Should I do this with a Subsite?

Thank you

Upvotes: 0

Views: 338

Answers (1)

Michael Snoyman
Michael Snoyman

Reputation: 31355

Have a look in your browser console, most likely you're getting 404s due to bad relative links. I'd try using a redirect call to point to the static for so that all of the relative links are correct.

Upvotes: 1

Related Questions