If you like our website and want to contribute — great news! You can submit your own art created with mlut and have it featured in our gallery.
-
Fork our repository from GitHub: https://github.com/mlutcss/website
-
Clone your fork locally using
git clone(or add it as a remote). -
Open a terminal (for example, Git Bash) and install all dependencies:
npm ci
-
You’re all set — feel free to explore and start creating!
Before making changes, please read through the conventions and tools we use in this project.
Our website is built with Eleventy (11ty) — a static site generator. We use EJS as our templating language, and we expect contributions to follow the same approach.
Both tools have clear and beginner‑friendly documentation:
- Eleventy: https://www.11ty.dev/docs/
- EJS: https://ejs.co/#docs
If you’re not familiar with them yet — don’t worry, they’re easy to pick up.
We use mlut to generate all CSS for the website. Every art piece shown in the gallery must be styled using mlut utilities.
mlut allows you to write utilities in several places:
classattributes of HTML elements- JavaScript strings
- String values of object properties
The mlut configuration is located in src/assets/style/style.scss.
Please do not modify this file unless absolutely necessary. It contains core variables and rules used across the entire website.
The only allowed exception is adding a background color for your art in the gallery — this is explained in the Contribution section below.
The package.json file contains several useful scripts for development:
-
npm run buildrunsnpx @11ty/eleventyandnpx mlut -i src/assets/style/style.scss. Builds thedistfolder and generates all CSS styles using mlut. -
npm run mlutis equivalent tonpx mlut -i src/assets/style/style.scss -w. Starts the mlut JIT engine and automatically generates styles based on templates. -
npm startis alias fornpx @11ty/eleventy --serve. Launches a local development server.
To add your own art made with mlut, follow these steps.
Create a new .ejs file in the following folder src/arts/.
This file should contain the layout of your art. You may use EJS features or plain HTML — both are perfectly fine.
- The filename must be unique.
- It must match the art’s identifier.
- Use kebab-case only.
Valid examples:
ghostpenrose-trianglepretty-long-art-name
Open the file src/_data/arts.json.
Add a new object describing your art. A typical entry looks like this:
{
"caption": "Penrose triangle",
"artId": "penrose-triangle",
"bgColor": "Bgc-$art850"
}artId— must match the filename of your.ejsfile.caption— optional and can be omitted.
Each art in the gallery has its own background color.
Open the mlut config file src/assets/style/style.scss.
Find the color palettes defined for:
- Dark theme:
@media (prefers-color-scheme: dark) - Light theme:
@media (prefers-color-scheme: light)
Inside the appropriate media query, add a custom CSS property following this pattern:
@media (prefers-color-scheme: dark) {
html {
/* core styles */
--ml-artYourArtName: /* your art background color */
}
}Please follow these rules:
- Use camelCase for custom property names.
- Replace
YourArtNamewith your actual art name.
Return to your art object in src/_data/arts.json and set the bgColor value to:
"Bgc-$artYourArtName"
- Double‑check that everything works correctly.
- Commit your changes.
- Push them to your forked repository.
- Open a Pull Request to the original repository.
That’s it!
We’re excited to see your creations and hope they’ll become part of our pure CSS art gallery