How to install and update Lume

As Lume is run by Deno, read the Deno installation instructions if you don't have it installed yet.

Don't install Lume

Lume doesn't need to be installed. The recommended way to use Lume is via Deno's tasks so you can run, for example, deno task lume` in any environment with Deno and it just works.

To setup Lume in your project folder, run the following command:

deno run -Ar

This command creates the following files:

  • _config.ts or _config.js: The Lume configuration file, where you can customize the site build.
  • deno.json: The Deno's configuration file. It includes the path of the import map file and some tasks to run Lume. You can also configure other features of Deno like TypeScript, formatter, permissions, etc.
  • import_map.json: The import map file with the import URL of Lume. Here you can add the dependencies of your project and update Lume by editing the version number.

Here is an example of these three configuration files:

import lume from "lume/mod.ts";

const site = lume();

export default site;

You can run Lume with deno task build (to build the site) or deno task serve (to build and start a local server).

To upgrade Lume, just run deno task lume upgrade.

Install Lume globally on your computer

It's also possible to install Lume globally by executing the following command:

deno run -A

Once installed, you have the lume command. To update Lume to the latest version, use the command:

lume upgrade --global

The command lume upgrade --dev installs the latest development version (the last commit in the Github repository). It's useful to test new features of Lume not yet released.

Run lume init to create the _config.js, deno.json and import_map.json files in your project.

Visual Studio Code configuration

If you use Visual Studio Code, it's highly recommended to install the Deno extension.

There are other extensions that you may want to install, depending on the template engine you want to use. For example Nunjucks, Liquid, Eta, postcss, etc.