I want to implement static HTML website with multiple languages using Hakyll framework. I didn't come up with better solution than just put default language under website.com
route and any other custom language at website.com/en
route. Because I'm using static HTML and having multiple languages I should have multiple versions of every page, for example about.html
. Such pages are generated automatically, so that's not a problem. But currently I have a problem with jumping those pages...
I have such link in my website.com/index.html
:
<a href=about.html>
When I open this link from website.com/en
I want to jump to website.com/en/about.html
instead of website.com/about.html
. But in reality I'm jumping from website.com/en
to website.com/about.html
. If I instead jump from website.com/en/index.html
I go to website.com/en/about.html
as I want. So I'm inserested in one of two possible solutions:
- When I go to
website.com/en
I want to be redirected towebsite.com/en/index.html
. I can see content ofindex.html
fromwebsite.com/en
but somehow I can't jump to relative link :( - Replace
href=about.html
with something more smart so I can automatically gofolder/about.html
from any folder.
Any help appreciated!