I want to write an HTML comment before and after each partial, with the path or name of the partial, to the guys who shall implement it.
I can get the path and filename of the page, but not the partial. Do you know how?
I want to write an HTML comment before and after each partial, with the path or name of the partial, to the guys who shall implement it.
I can get the path and filename of the page, but not the partial. Do you know how?
I think I do know what you mean now.
I put this helper together, let me know if it helps.
Currently the helper only adds a comment before the partial with a path to the original partial - which includes the name of the partial. it seems superfluous to also include the name of the partial since it's already in the path, but if you want that please add a feature request on that repo and I'll get it added. We can easily have it append a comment as well.
You can install the helper with:
To have the helper generate the HTML comments with the path to the partial, you will need to define following in the assemble options (I did it this way to make the helper usable for others as well):
Alternatively you can just add a file named
include.json
with:And then specify the path to that file in the Assemble options:
Here is the full code for the helper: