Minify HTML

Minify the HTML code of your pages.

Installation

Import this plugin in your _config.ts file to use it:

import lume from "lume/mod.ts";
import minifyHTML from "lume/plugins/minify_html.ts";

const site = lume();

site.use(minifyHTML({/* your config here */}));

export default site;

See all available options in Deno Doc.

Description

The MinifyHTML plugin minifies the HTML code of your pages using the minify-html minifier. It can also minify CSS and JavaScript code.

Configuration

This plugin accepts a configuration object. The available options are:

  • extensions: Array with the extensions of the files that will be minified. By default it is [".html"], but you can include also .css and .js to minify these files.
  • options: The available options for minify-html. See the documentation for more info.