Using Nunjucks 'If Expressions' in 11ty to create a simple active navigation state
In this tutorial, we'll set up a simple navigation, identify what page navigation item we need to activate based on URL parts and add an active class to that element with no need of an if tag
If you write a technical blog and use 11ty as your static site generator of choice you might run into a conundrum: How do you show Liquid or Nunjucks template code in your code blocks.
These days, web development and design are all about modularization and components. Template languages have a lot to offer and Eleventy itself has a few tricks up its sleeve.