Browse Source

move css version into filename behind a rewrite rule

master
Annika Backstrom 5 months ago
parent
commit
99ee9abe6f
Signed by: Annika Backstrom <annika@sixohthree.com> GPG Key ID: 1FB1723D467863F4
3 changed files with 5 additions and 1 deletions
  1. 2
    0
      nginx/css.conf
  2. 2
    0
      publishconf.py
  3. 1
    1
      themes/bleached/templates/base.html

+ 2
- 0
nginx/css.conf View File

@@ -1,3 +1,5 @@
location /assets/css/ {
root /var/sixohthree/sixohthree.com;
rewrite ^/assets/css/main\.[0-9a-f]+\.css$ /assets/css/main.css;
expires max;
}

+ 2
- 0
publishconf.py View File

@@ -13,3 +13,5 @@ ENVIRONMENT = 'production'
DELETE_OUTPUT_DIRECTORY = True

RELATIVE_URLS = False

CSS_FILE = "main.{}.css".format(BLOG_VERSION)

+ 1
- 1
themes/bleached/templates/base.html View File

@@ -10,7 +10,7 @@
{% block extra_meta %}
{% endblock %}

<link rel="stylesheet" href="{{ SITEURL }}/assets/css/{{ CSS_FILE }}?v={{ BLOG_VERSION }}">
<link rel="stylesheet" href="{{ SITEURL }}/assets/css/{{ CSS_FILE }}">

{% block scripts %}
{% endblock %}

Loading…
Cancel
Save