I love using Jekyll and Bootstrap to create static websites. Jekyll is pretty cool, but doesn’t have really much helper utils to get common tasks done well and fast. In building a website powered by Jekyll, I want to have ability to create a dynamic navigation bar with highlighting of the active element in the bar. I also wanted the bar to support the second level elements (i.e. Bootstrap Dropdown menu). Since I don’t like hard coded HTML navigation links, I therefore worked out an alternative, configurable way. This is the solution I arrived at after a few hours of thinking and code writing.html
↧