A node script parses breakpoints, dynamically generates Jekyll Front Matter, and places all Front Matter in a dynamically generated folder/file structure.
This node script was designed for a specific banner ad project (I've anonymized the content), but I've been able to adapt it to several related uses.
Our team had to convert dynamic banner ads to static banner ads. The dynamic ads were built using Google Studio (previously, DoubleClick Studio), I wanted to create a script to generate all the necessary Front Matter files for our local Jekyll repo. Previously we had been writing these files by hand, then copy/pasting/editing for each concept/size (44 files total).
Great question! I was given these inconsistent naming conventions by team members (who created images, designs, project structure etc.), so instead of manually renaming files I decided to programmatically format the names.
script.js
file.for
loops in order to cycle through all concepts and sizes. for
loops, I populated our standard Front Matter with dynamic values. <spans>
that an external function parses according to our original setup for Studio's dynamic feed.fs
I created/used the ./ads/
folder, created/used current concept/size folder, and populated the relevant index.html
file w/ the generated Front Matter.You can check the folders and files in ads
to see an example of what the output looks like.