Installation

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.

Setup Lume

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

deno run -A https://lume.land/init.ts

This command creates the following files:

_config.ts
The Lume configuration file, where you can customize the site build.
deno.json
The Deno's configuration file. It includes the import map and some tasks to run Lume. You can also configure other features of Deno like TypeScript, formatter, linter, etc.

Here is an example of these two configuration files:

import lume from "lume/mod.ts";

const site = lume();

export default site;

Now you can use Deno's tasks to run Lume in any environment. The command deno task lume runs Lume and you can add additional arguments. For example deno task lume -s runs Lume, open a local web server and start watching the changes.

The tasks build (to build the website) and serve (to build and start a local server) are just shortcuts to the main lume task with additional arguments.

Run deno task lume -h to see the instructions.

Update Lume

The task deno task lume upgrade upgrades the Lume version used in your project folder to the latest version.

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

Vendoring

If you want to download all remote dependencies of Deno in a local folder, you can use the DENO_DIR environment variable. For example, edit the lume task to define this variable:

{
  "tasks": {
    "lume": "echo \"import 'lume/cli.ts'\" | DENO_DIR=_vendor deno run -A -",
    "build": "deno task lume",
    "serve": "deno task lume -s"
  }
}

Now, when you run any Lume task, all Deno dependencies will be downloaded into the _vendor folder.

Visual Studio Code configuration

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

WebStorm configuration

There's a Deno plugin for WebStorm that you can install if you use this IDE.