Skip to content

Added the ability to inline JS and CSS#491

Open
simultech wants to merge 1 commit intojazzband:masterfrom
simultech:master
Open

Added the ability to inline JS and CSS#491
simultech wants to merge 1 commit intojazzband:masterfrom
simultech:master

Conversation

@simultech
Copy link
Copy Markdown

Adds the ability to do inline JS/CSS with pipeline by adding ‘inline’
to the template tag, aka:

{% javascript 'head_js' 'inline' %}

This pull request is for the aim of opening the discussion around what needs to be done to enable inline embedding of Javascript and CSS directly into the page. This is useful when optimizing network requests for styles/scripts only relevant to a single page.

Adds the ability to do inline JS/CSS with pipeline by adding ‘inline’
to the template tag, aka:

{% javascript 'head_js' 'inline' %}
@toabi
Copy link
Copy Markdown

toabi commented Sep 3, 2015

This feature would also be useful for me.

@simultech
Copy link
Copy Markdown
Author

Anyone reading this we were able to monkey-patch it in to live by duplicating the template-tags in your own app, and overriding the django-pipeline tags to support 3 arguments (and then return the output into the template)

@davidt
Copy link
Copy Markdown
Contributor

davidt commented Mar 7, 2016

This seems reasonable, but a cleaner solution would be to have separate templatetags instead of trying to parse a variable number of arguments.

@mbeijen
Copy link
Copy Markdown

mbeijen commented Jun 30, 2017

Inlining CSS is also great for HTML emails! I'd really would like to get support for that in this module. Is there anything I can do to help get this module in better shape?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants