Skip to content

how to add data.json to pug rendering? #96

Description

@afknapping

I wonder how I can pass data into the pug rendering process.

I found this:

...with something like render(view, { locals: { projects: myObjectHere }})

but would want to have that in a seperate json or even better yml file.

if that is not currently possible (which i guess), where would i hack that in? for example, i found pug being mentioned in node_modules/@pingy/compile/lib/compile.js but not sure where or how to continue from there...

My usecase is having text snippets I want to use consistently through the UI and change them in one place only... like the copy "continue" in some buttons and the like...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions