New Accordion Plugin
I've been a Nikola user for a few years now, and I'm a big fan. One of the reasons why I picked it is because it is implemented in Python. Python is of course my favorite programming language. And because Nikola is written in Python, it should be easier for me to write code to build my own extensions.
For various reasons I never actually did that until now. I wanted an Accordion reStructuredText directive, and since it didn't exist, I had to build it myself. And that's what I did. Getting it to work completely took some fiddling but I have it working. See an example below.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi accumsan, nulla sit amet aliquam molestie, nisi purus dignissim ante, non scelerisque diam ligula eu ex. Integer tristique felis id mattis imperdiet. Maecenas elementum purus quis vestibulum elementum. Etiam nec eleifend metus, vel convallis nisl. Fusce tempor ante felis, vitae tincidunt nulla pulvinar sed. Vivamus eget ipsum nulla. Vestibulum lectus enim, facilisis vel ipsum in, vulputate sodales ligula. Curabitur lorem erat, ullamcorper sit amet imperdiet vitae, lobortis non neque. Fusce porta tempor nulla. Vivamus pulvinar purus nibh. Vestibulum semper rutrum sapien, eget suscipit lectus semper sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aenean vel fringilla urna, ut vestibulum arcu. Sed bibendum augue risus, quis gravida libero bibendum ac.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi accumsan, nulla sit amet aliquam molestie, nisi purus dignissim ante, non scelerisque diam ligula eu ex. Integer tristique felis id mattis imperdiet. Maecenas elementum purus quis vestibulum elementum. Etiam nec eleifend metus, vel convallis nisl. Fusce tempor ante felis, vitae tincidunt nulla pulvinar sed. Vivamus eget ipsum nulla. Vestibulum lectus enim, facilisis vel ipsum in, vulputate sodales ligula. Curabitur lorem erat, ullamcorper sit amet imperdiet vitae, lobortis non neque. Fusce porta tempor nulla. Vivamus pulvinar purus nibh. Vestibulum semper rutrum sapien, eget suscipit lectus semper sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aenean vel fringilla urna, ut vestibulum arcu. Sed bibendum augue risus, quis gravida libero bibendum ac.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi accumsan, nulla sit amet aliquam molestie, nisi purus dignissim ante, non scelerisque diam ligula eu ex. Integer tristique felis id mattis imperdiet. Maecenas elementum purus quis vestibulum elementum. Etiam nec eleifend metus, vel convallis nisl. Fusce tempor ante felis, vitae tincidunt nulla pulvinar sed. Vivamus eget ipsum nulla. Vestibulum lectus enim, facilisis vel ipsum in, vulputate sodales ligula. Curabitur lorem erat, ullamcorper sit amet imperdiet vitae, lobortis non neque. Fusce porta tempor nulla. Vivamus pulvinar purus nibh. Vestibulum semper rutrum sapien, eget suscipit lectus semper sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aenean vel fringilla urna, ut vestibulum arcu. Sed bibendum augue risus, quis gravida libero bibendum ac.
I'm especially excited I can add arbitrary reStructuredText directives into each section, including images and videos.
The Last Starfigher (1984)
Terminator Trailer (1984)
Bladerunner (1982)
There are still some bugs to work out but basically this works the way I want it to. After I test it some more I will make a pull request to share with the Nikola community.
Comments