-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to configure Jade options #2614
Comments
We're closing all questions and support requests to keep the issue tracker unpolluted. Please ask this question on Stackoverflow or Gitter instead! |
This really is an issue. There is no way to configure Jade in Keystone and quality suffers. Having uncompressed HTML in development and compressed production prevents certain layout techniques and causes surprising layout bugs moving between development and production. .tile {
display: inline-block;
width: 50%;
} <div>
<div class="tile">Foo</div>
<div class="tile">Foo</div>
</div> Renders the tiles in 2 rows. <div><div class="tile">Foo</div><div class="tile">Foo</div></div> Displays tiles in 2 columns. Ideally, Jade alway runs without |
Wow, that is genuinely surprising. I was under the impression that whitespace (not spaces between elements but newline+tabs) were ignored by browsers. We're prepping an 0.3 patch release, I'll see what can be done to open those options up for you. |
Relevent: pugjs/pug#1833 (comment) |
+1 |
This should be configurable: https://github.com/keystonejs/keystone/blob/v0.3.x/lib/core/render.js#L26 |
In the meantime, for others stuck, and not a permanent fix/solution: response.locals.pretty = false Inside route middleware seems to force Jade to ignore earlier config and render minified HTML. |
@arthurcamara1 that's actually only having an impact on the Admin UI which isn't relevant to this issue; the problem here is being able to configure |
I've made it so you can now specify |
…am/v0.3.x into release/two-language-main-vi * commit 'c38b366c7b1bf01448c8ece7c36e1bb6eb195186': (63 commits) fixes Cloudinary select fields break other Relationship fields when using select: true (keystonejs#3848) Don't cache relationship options fix linter errors, I'm a little OCD implement fix to determine whether input param is string or object and act accordingly to set q value Fix keystonejs#3207 Removing hardcoded keystone references in the API 0.3.22 Update CHANGELOG Fix relationship inital display Allow local connections without forcing SSL Let's Encrypt support Fix to prevent the use of regex matching when applying an "exact" filter through the Keystone admin ui Convert req strings to number where needed keystonejs#3011 | Fix Date format option bug v0.3.21 Updating changelog Only setting pretty local when it is undefined, ref keystonejs#2614 v0.3.20 Updating changelog keystonejs#3030 | fix Date unit tests ... # Conflicts: # fields/types/boolean/BooleanField.js # index.js
I need to disable the Jade
pretty
option in both development and production so HTML is minified, to avoid whitespace issues whendisplay: inline-block
components are looped next to each other.Looking at the way Keystone renders the views here, this should at least happen if you set the node env to production. I tried this to no effect.
Regardless, I would like to be able to configure Jade for development.
Is there a workaround in the meantime?
The text was updated successfully, but these errors were encountered: