Skip to content

Commit

Permalink
Add an option to inline all CSS
Browse files Browse the repository at this point in the history
This is still a bit buggy [0], so this is off by default. We should turn
this on by default once it works without problems.

The idea is that we then (and with favicon inlined) only have one single
file to serve for each page.

Still we need to investigate client compatibility, because in
8217ac0 we already had to revert
inlining of favicons by default.

[0] getzola/zola#605 (comment)
  • Loading branch information
vimpostor committed Dec 22, 2023
1 parent b46ac05 commit 0594e3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@
{# RSS #}
<link rel="alternate" type="application/atom+xml" title="{{ config.title }}" href="{{ get_url(path="atom.xml", trailing_slash=false) }}">

{% if config.extra.css_inline | default(value=false) -%}
<style>{{load_data(path="public/main.css") | safe }}</style>
{% else %}
<link rel="stylesheet" type="text/css" media="screen" href={{ get_url(path="main.css") }} />
{% endif %}
</head>

0 comments on commit 0594e3f

Please sign in to comment.