Skip to content
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

Added the ability to inline JS and CSS #491

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simultech
Copy link

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

toabi commented Sep 3, 2015

This feature would also be useful for me.

@simultech
Copy link
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
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

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