perlorg / perlweb

Various perl.org websites
http://noc.perl.org/
Other
70 stars 97 forks source link

css needs to be dynamic when under development #24

Open ranguard opened 13 years ago

ranguard commented 13 years ago

/static/css/leostyle.css has TT in it:

e.g:

background: transparent url([% combust.static_url("/images/arrow_grey.gif") %]) no-repeat center right

Either the TT should be removed or CSS files need to be served through TT when developing.

rspier commented 8 years ago

(from our thread from May 2016)

OPTION A:

1) make a static host

(assumption, *.localhost points to 127.0.0.1)

[static] servername = static.localhost

2) add static_base to your site's config pointing to the new static host.

[www] servername = www.localhost static_base = //static.localhost:8230/

(8230 should match up with whatever the port setting is earlier in the file.)

OPTION B:

--- a/apache/conf/sites/www.tmpl
+++ b/apache/conf/sites/www.tmpl
@@ -30,4 +30,9 @@
         Allow from all
     </Directory>

+    <Location /static/css/>
+       SetHandler perl-script
+       PerlHandler PerlOrg::Control::CSS
+    </Location>
+
   </VirtualHost>

COMMENTARY: Option A is mirrors how production works.
Option B would need to be added to all vhosts that use static files.