mettu (మెట్లు, /ˈmɛt.t̪u/) is a simple static site generator that uses Python for backend processing and Vite for frontend development, with Tailwind and DaisyUI for styling. It allows you to create static websites using markdown files.
"mettu" is a Telugu word meaning a stair or step. It felt like a great name given that this project is a step towards building tools myself, and convieniently, a step towards making a site!
- Python 3.x
- Node.js and npm
- Vite
- Tailwind CSS and DaisyUI
-
Clone the repository
-
Install the required dependencies
npm install
- Note: Python dependencies are installed by default by the initialising script.
-
Edit the
config.yamlfile to set your site name, author, runtime configuration, navigation links, syntax highlighting theme, and DaisyUI theme preferences.runtime: python_executable: "python3" # optional, defaults to python3 when omitted theme: default: "cupcake" # active theme used for data-theme include: ["cupcake", "dracula"] # DaisyUI presets to load custom: mytheme: primary: "#570df8" secondary: "#f000b8" accent: "#37cdbe"
Optionally, define site-wide font imports and the families to apply:
fonts: imports: - "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Space+Grotesk:wght@500;700&display=swap" families: body: "'Inter', sans-serif" heading: "'Space Grotesk', sans-serif" mono: "'JetBrains Mono', monospace" syntax: pygments_theme: "dracula" # Controls syntax.css and markdown highlighting
You can still override the interpreter via the
PY_EXECUTABLEenvironment variable if needed, but the config file is the canonical source. -
Create markdown files in the
contentdirectory. Each file should start similarly to the given examples. -
Templates and svg icons are located in the
templatesdirectory. You can customize them as needed. -
Assets like css, images, etc are placed in the
assetsdirectory. -
Run the development server
npm run dev
-
Build the site for production
npm run build