Quick start: source files
The source files let you change a colour, a menu, a phone number or a whole section once and rebuild every page automatically. You'll run three short commands; you don't need to know how to program.
1. Install Node.js (once)#
Download the “LTS” version from nodejs.org and install it like any other program. To check it worked, open a terminal (on Windows: Command Prompt or PowerShell; on macOS: Terminal) and type:
node -vYou should see a version number such as v20.11.0. Anything from 18 upwards is fine.
2. Install the template's tools (once)#
In the terminal, go to the source folder and install. The easiest way to “go to” a folder: type cd followed by a space, drag the source folder onto the terminal window, and press Enter.
cd path/to/Omnira/source
npm installThis downloads the build tools into a node_modules folder. It takes a minute and only needs doing once.
3. Start the live preview#
npm run devOpen http://localhost:3000 in your browser. Leave the terminal open: every time you save a file in src/, the pages rebuild. Refresh the browser to see the change. Press Ctrl + C in the terminal to stop.
4. Make your changes#
Everything you edit is in source/src/:
| To change… | Edit | Guide |
|---|---|---|
| Business name, logo, phone, email, address, social links | src/config/site.json | Name, logo and contact details |
| A demo's colours, fonts, menu, header and footer | src/demos/<demo>/demo.json | Colours and fonts, Header and menu |
| The content of a page | src/demos/<demo>/pages/<page>.json | Pages and sections |
| Rooms, courses, products, team members, blog posts… | src/demos/<demo>/data.json | Data and detail pages |
| Styles | src/scss/ | Styles (SCSS) |
5. Build your finished website#
When you're happy, build just the demo you're using as a standalone website:
npm run site -- restaurantThis creates a site folder with the restaurant pages at the top level, all the assets they need, and no demo or colour switcher. Upload the contents of site/ to your hosting. See Publishing your site.
To rebuild all demos instead (for example to keep the overview page), run npm run build; the result is in dist/.
Made a typo? If a JSON file has a mistake (a missing comma or quote), the terminal shows the file name and the line, and the other pages keep working. See Troubleshooting.