Getting Started
Still is a simple static site generator for pragmatic developers. It's a modern tool that doesn't magically solve every single problem, but also doesn't create any new ones. It's a modern and sane experience, designed to be composable, easy to use and to grow in complexity with your needs and abilities.
🚧 This documentation is still incomplete, but we built the landing page with Still to showcase some of its features. Have a look there if you can't find what you're looking for here.
Quick start
Still is in early active development. It requires at least Elixir 1.11.3 and Erlang 23.0.3. It may work with previous versions, but these are the versions we are building on.
To bootstrap a new site, run the following commands:
mix archive.install hex still_new
mix still.new mysite
This will create an Elixir project in the folder mysite. You'll find an index.slime
file inside priv/site
.
Run cd mysite
and then you can just run mix still.dev
to start the development server. Then open http://localhost:3000 in your web browser to see the new website.
Installation
Still can be used by itself or as part of another project.
For new projects
Run mix archive.install hex still_new
to install the archive on your system.
Afterwards, create a site by running mix still.new my_site
. That's it!
Adding to an existing project
Add still
as a dependency in mix.exs
:
def deps do
[
{:still, "~> 0.8.0"}
]
end
Copy the configs from here to your project.
Finally, create a file index.slime
in the input folder.
Development
Run mix still.dev
to start the development server. Then your website will be available in http://localhost:3000.
Still is watching your file system for changes and it refreshes the browser when necessary. If there are any errors building the website, they will show up on the browser, along with the stack trace and the context where the error happen.
If you run iex -S mix still.dev
you'll get an interactive shell where you can test things quickly, such as API calls.
Building a website
Still takes the files in your input folder, which is priv/site/
by default, and turns them into a website. The input folder is where you'll spend most of time, writing Slime templates and CSS. Add a new file about.slime
to your input folder with the contents:
---
layout: _layout.slime
---
h1 About
And a new page will be available in http://localhost:3000/about.
Production
Run mix still.compile
to compile the site to the output folder, which is _site
by default. See the source code for the Github Action that deploys the landing page for more information on how to set up automatic deploys.