I am building my website using a Jekyll theme. The basic website is up and running. However, I wanted to provide an option on the UI to change the theme. Is it possible to add a button such that a mouse click on it changes the theme?
Expanding on what I'm asking, Jekyll generates static pages. Is it possible to re-trigger Jekyll from the webpage itself to generate pages with a new _layout
and _sass
?
One possible approach might be to keep the two themes in different branches, and then change the Github pages publishing source
to the new branch. Is this approach possible? Or are there any alternatives?
No, this approach is not possible - if the click would run the generator, it would no longer be a static page.
What you can do is