When a webpage is created, webpage authors and static page generators will often grab low-level asset files from a trusted location. Between Pelican and Elegant, these files will often number between 8 and 15 CSS or JavaScript files. While these files are essential to the proper look and feel of a properly designed website, the overhead of this content being in separate files is that separate requests are made for each of them to the server.

Important

Elegant comes with a compressed and concatenated CSS stylesheet, so that only one request is made to fetch the CSS stylesheets. Following instruction is redundant for most users.

But if you have decided to customize the theme using custom.css then follow these instruction.

Pelican provides a plugin that takes the various CSS and JavaScript files and compiles each group of them into a single file. Not only does this process reduce the number of calls to retrieve files from the server, but it minifies or reduces the overall size of those files as well.

Configuration

To enable Asset Management for your website, add assets to the PLUGINS configuration variable in your Pelican configuration.

PLUGINS = ['assets']

Note

The assets plugin requires the Python webassets and cssmin packages to be installed.

Like this post? Share on: TwitterFacebookEmail


Talha Mansoor Avatar Talha Mansoor is the creator and lead developer of Elegant theme.
Jack De Winter ever evolving, ever learning

Keep Reading


Published

Last Updated

Category

Supported Plugins

Tags

Stay in Touch

Get New Release Alert