You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, maybe I shouldn't but I use the -O flag to pass in some json that represents data in my app. I do this to separate data about events (like in person events) on my website, from all the various code that controls how to display the data about those events. Then I compile my pug files into static website assets, which is why there's no server where I can affect locals.
I'd suggest supporting listing a directory for the -O flag, so that it'll load multiple json files or javascript files and the variables they declare, into pug.
My higher level interest is to be able to make app data available in pug even when there's no server code, as in static site development. I just run two npm scripts to watch and build my site.
The text was updated successfully, but these errors were encountered:
For anyone else who arrives here, I ended up stringing together several files with jq using this command: jq -s '.[0] + .[1]' site-data.json public-keys.json >options.json and then running pug with that options.json object using the -O flag.
So, maybe I shouldn't but I use the
-O
flag to pass in some json that represents data in my app. I do this to separate data about events (like in person events) on my website, from all the various code that controls how to display the data about those events. Then I compile my pug files into static website assets, which is why there's no server where I can affect locals.I'd suggest supporting listing a directory for the -O flag, so that it'll load multiple json files or javascript files and the variables they declare, into pug.
My higher level interest is to be able to make app data available in pug even when there's no server code, as in static site development. I just run two npm scripts to watch and build my site.
The text was updated successfully, but these errors were encountered: