📄 Multi-Page Application

MPA QuickStart

Build a traditional multi-page site with separate HTML files for each page. Perfect for content sites, blogs, and documentation.

SEO Friendly No JS Required Static Hosting

Setup Your MPA in 3 Steps

1

Create & Initialize Project

$ mkdir my-mpa-site && cd my-mpa-site
$ npm init -y

Creates a new project folder and initializes package.json

2

Install Domma

$ npm install domma-js

Downloads Domma from npm (~260KB minified)

3

Generate MPA Structure

$ npx domma init --mpa

Creates a complete multi-page site structure with separate HTML files

✓ Generated File Structure:

pages/index.html (Home)
pages/about/index.html
pages/contact/index.html
pages/blog/index.html
pages/docs/index.html
css/custom.css
js/app.js
domma.config.json
✓ Ready! Open pages/index.html in your browser or run:
$ npx live-server pages

Live MPA Example

This is a working example of what your MPA will look like. Each section represents a separate HTML page.

Welcome to My Site

A beautiful multi-page site built with Domma

Lightning Fast

Optimized for speed and performance

Secure

Built with security best practices

Zero Dependencies

No external dependencies required

Code Structure

domma.config.json

{
  "project": {
    "name": "My MPA Site",
    "version": "1.0.0"
  },
  "theme": {
    "default": "charcoal-dark",
    "persist": true
  },
  "navbar": {
    "brand": { "text": "My Site", "url": "/" },
    "items": [
      { "text": "Home", "url": "index.html" },
      { "text": "About", "url": "about/index.html" },
      { "text": "Contact", "url": "contact/index.html" }
    ]
  }
}

pages/index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <link rel="stylesheet" href="../node_modules/domma-js/public/dist/domma.css">
  <link rel="stylesheet" href="../node_modules/domma-js/public/dist/elements.css">
  <link rel="stylesheet" href="../css/custom.css">
</head>
<body class="dm-theme-charcoal-dark">
  <nav id="navbar"></nav>

  <main class="container py-6">
    <h1>Welcome to My Site</h1>
    <p>This is a multi-page application.</p>
  </main>

  <footer class="page-footer"></footer>

  <script src="../node_modules/domma-js/public/dist/domma.min.js"></script>
  <script src="../js/app.js"></script>
</body>
</html>

You're Ready to Build! 🎉

Your MPA is set up and ready. Start editing pages in the pages/ folder.