Lume (Deno)

Lume (Deno)

Lume is a fast and flexible static site generator built with Deno, designed to help you create modern websites with ease.

Requirements

If you need an example source code, use the Lume website, you’ll need git:

git clone https://github.com/lumeland/lume.land myStaticApp

Deploy a static application

You can create an application in our Console or through Clever Tools. Install them with npm or any supported package manager:

# Install with npm or any supported method
npm i -g clever-tools

# Login to Clever Cloud and check it worked
clever login
clever profile

Go to the folder where you want to create your application, and run the following command:

cd myStaticApp
clever create -t static

# If the folder is not a git repository, initialize it:
git init

To deploy on Clever Cloud, your local folder need to be an initialized git repository linked to an application. If you already have an application on Clever Cloud and want to link it to the current local folder:

clever link your_app_name_or_ID

Environment variables

Next, configure the application with a pico instance with dedicated Medium build (needed for Deno), enough for a simple website. As Clever Cloud is based on standards, you only need to define a few variables:

clever scale --flavor pico
clever scale --build-flavor M

clever env set CC_WEBROOT "/_site"
clever env set CC_BUILD_COMMAND "deno task lume"

It defines _site as the folder to serve with the web server and deno task lume as the command to build the static files.

Deno installation

Create a mise.toml file, add this content:

mise.toml
[tools]
deno = "latest"

It uses Mise package manager to install Deno during deployment. You can replace latest with a specific version.

Tip

If you use Mise locally, run mise trust to trust the created mise.toml file

Push your code

Once you complete these steps, commit your content to the local repository and deploy it:

git add .
git commit -m "First deploy"
clever deploy
clever open

You can display your website’s URL or add a custom domain to it (you’ll need to configure DNS):

clever domain
clever domain add your.website.tld

404 page location

If you need to use a specific page for 404 errors, define its location with SERVER_ERROR_PAGE_404 environment variable from Static Web Server, used as default in static runtime. For example : SERVER_ERROR_PAGE_404=404.html.

🎓 Learn more

Last updated on

Did this documentation help you ?