Skip to content
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.

Pug data not working in templates: how to define static data for Pug? #209

Open
goodpixels opened this issue Nov 16, 2017 · 0 comments
Open

Comments

@goodpixels
Copy link

goodpixels commented Nov 16, 2017

I am trying to use static variables in my Pug templates, like so:

template.pug

h6 Currently running version #{version}

This works perfectly fine from the CLI:
pug --obj package.json template.pug --out public

But I don't know how to pass package.json to Vueify.

I tried using vue.config.js and adding a data object to it, but to no avail.

How can I achieve this? Thank you!

UPDATE:

Looking at source code for compiler.js, it seems that there is no data passed to the templates.

I found this, but it's not really helpful: https://forum.vuejs.org/t/pug-template-data-binding-in-vue-component/7437/2

@goodpixels goodpixels changed the title How to define data for pug? How to define data for Pug? Nov 16, 2017
@goodpixels goodpixels changed the title How to define data for Pug? Pug data not working in templates: how to define static data for Pug? Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant