I might be too optimistic here but couldn’t find on the internet how to set Root route in Jekyll like one can able to achieve in Ruby on Rails.
root 'pages#home'
Just curious, can we able to do such in Jekyll at the moment?
If yes, any pointers are really appreciated.
No you can’t.
Jekyll builds static HTML and doesn’t run as a Jekyll server in production. So a user lands at index.html and that’s it.
What is your reason for skipping the user to an element rather than starting at the top of the page?
You can also just update your links e.g. in your readme so you can point people to https://example.com/foo/#home
But that only works if they come in from that angle.
1 Like
You may be tempted to update baseurl in the config but I think that will break your routing
E.g. setting baseurl with Hash would mean links go to /repo#home/path/to/page
which is bad