Closed adrigm closed 8 years ago
no, why do you need the name of the file?
To generate a menu.
Check if the current html file to add the link a class.
Adding an active class to a link is not the purpose of this plugin. Normally you should try doing that in another part of your workflow.
And don't get me wrong, this would not be even possible right now, since the processor is being created once, and not per file.
I'm sorry, I think you should do this in the website itself not in the development process. use some javascript to check that on the dom or on the server side.
tip https://css-tricks.com/snippets/jquery/add-active-navigation-class-based-on-url/
I can get a variable with the name of the html file where the command is executed?
Where "foo.html" is the html file where is the comment.
Mi componentsMenu Block: https://gist.github.com/adrigm/e6f8780ef937015366a6f2080088ae32