nuckty
RU
All sections →

Getting started

Download the starter, build a first page and edit its text. Then add pages and blocks of your own. For details, see How to use.

Requirements

Building requires Node.js 24+, npm, and public npm access for dependencies. Install nginx to preview with npm run serve; the build itself does not need it.

1. Download the starter

Download nuckty-starter.zip

Extract the archive and open nuckty-starter in a terminal:

cd nuckty-starter
npm install

The packages/ directory contains prepared archives of the core and all ten extensions. package.json initially installs the core, the root document wrapper and the serve preview commands; follow the catalogue to add other extensions. Package dependencies come from public npm. This project does not need sibling source repositories.

2. Build and preview the page

The build also generates .build/nginx.conf. Its generator rejects paths containing a dollar sign ($) or control characters; choose a project directory without them.

npm run build
npm run serve

Open http://localhost:8080. The build wrote site/html/index.html, and nginx serves it at /. To stop the preview, run npm run stop in another terminal from the same directory.

3. Edit the content

Open content/index.md, replace the heading and add a paragraph:

# My first website

This page is built with nuckty: Markdown → BEMJSON → HTML.

Run npm run build and reload the page. The server keeps serving files from site/, so a content edit does not require restarting it.

4. Explore the configuration

config/config-nuckty.ts defines one target — one website build:

import { defineNucktyConfig } from 'nuckty';

export default defineNucktyConfig({
    targets: {
        main: { configDir: 'config/', outDir: 'site/', lang: 'en', host: 'localhost' },
    },
    ext: ['nuckty-ext-block-root', 'nuckty-ext-command-serve'],
});

root provides the HTML document wrapper; serve provides preview and stop commands. site.json selects the page bundle. Its declaration in blocks/page/page.bemdecl.js lists the blocks:

module.exports = ['root'];

5. Add a page

Create content/about.md and include it in config/sitemap.yml:

sitemap:
  - Home [/, index.md]
  - About [/about, about.md]

After a build, the page is available at /about. Link to it from the first page as [About](about.md); the engine substitutes its URL from the sitemap.

Build output

site/
├── html/                  ← pages
├── css/                   ← content-hashed styles
├── svg/                   ← logo
├── brotli/                ← Brotli copies
├── gzip/                  ← Gzip copies
├── .htaccess              ← Apache configuration
└── manifest.json          ← sizes and hashes for publication

The artifact can be copied to a compatible server. Apache needs the required modules and permission to use .htaccess; see hosting configuration.

What's next

After a local install, npm scripts can invoke nuckty directly. In a terminal, use npx nuckty ….