Princeton-CDH / derrida-django

Derrida's Margins - Python/Django web application
https://derridas-margins.princeton.edu
Apache License 2.0
8 stars 1 forks source link

setup tinyMCE styled previews #222

Closed thatbudakguy closed 6 years ago

thatbudakguy commented 6 years ago

borrows from https://github.com/Princeton-CDH/cdh-web/commit/d7f10431896798e0167361d6034c4f34e8794d91.

thatbudakguy commented 6 years ago

Maybe I'm misunderstanding but I don't think that option helps us - we need the full exact filename in order to pull it into tinyMCE, and the hash after the base filename will still change every time compressor runs.

rlskoeser commented 6 years ago

@thatbudakguy perhaps you missed the fix that @bwhicks added to cdh-web to get it working on the production site: https://github.com/Princeton-CDH/cdh-web/commit/f0395e6140b9b843cfb67975ec18d81843fce09e

This config doesn't get us the full name, but my hope was that it would let you use the style regex you've got now instead of having to look for CACHE.

thatbudakguy commented 6 years ago

I did indeed miss that...kind of weird that compressor preserves the name in development but only uses the hash in prod.

I tried using:

    {% compress css file editor %}
        <link type="text/x-scss" rel="stylesheet" href="{% static 'scss/style.scss' %}" charset="utf-8"/>
    {% endcompress %}

but the generated filename is the same (style.hash.css)...compressor doesn't seem to respect the option.