Get Started

Install and set up Swifty in seconds.

Ready to build something awesome? Let's get you up and running with Swifty in no time!

Installation

First, grab Swifty from npm:

npm install @daz4126/swifty

Create Your First Site

Swifty comes with a handy command that sets up a fresh project with all the folders you need:

npx swifty new my-site

This creates a my-site/ folder with a starter page, default layout, responsive stylesheet, and a tiny js/hello-swifty.js script to show where browser code lives. Replace my-site with whatever you want to call your project.

Start Developing

Fire up the development server and watch your site come to life:

npx swifty start

Head over to localhost:3000 and boom - you've got a website! The dev server includes live reload, so every time you save a file, your browser refreshes automatically. No more manual refreshing like it's 2005.

Build for Production

When you're ready to ship your masterpiece to the world:

npx swifty build

This creates a squeaky-clean dist/ folder with optimized HTML, CSS, JS, and images - no development scripts, no cruft. Just pure, fast static files ready for deployment.

Quick Deploy

If your site is in a git repo, you can build and deploy in one command:

npx swifty deploy "Updated content"

This runs the build, stages only the generated dist/ folder, commits it with your message, and pushes it. Your source files and other working-tree changes are left untouched.

That's It!

Seriously, that's all you need to get going. Swifty handles the boring stuff so you can focus on creating great content. Check out the rest of the docs to discover layouts, partials, and all the other goodies.