Build a website with the Enonic Site Framework

Contents

This step-by-step tutorial introduces the Enonic Site Framework, the built-in way to build content-driven websites on Enonic XP. You’ll render content with pages, parts, and layouts, and compose and publish the result in Content Studio.

Intro

With the Enonic Site Framework, Enonic XP renders your site itself. For each request, XP finds the content, resolves its page, and runs your server-side JavaScript controllers and HTML templates to produce the response. Editors compose the pages visually in Content Studio, using the components you build.

When you are done, a country page on your site will look something like this:

A rendered country page with the Enonic logo, a text, country facts and a list of cities with an image

You will complete the following steps:

The content types, regions, and page templates you meet here are concepts of the CMS and apply whichever front-end you use. The controllers and views are specific to the Site Framework.

Enonic also supports other front-end frameworks. Next.js renders outside XP and fetches content through the API. React4XP runs inside XP like the Site Framework, but replaces its page rendering with one based on React.
Throughout this tutorial, "XP" refers to "Enonic XP", the platform behind Enonic.

Prerequisites

No prior Enonic experience is required. Basic familiarity with HTML and JavaScript or TypeScript is helpful.

To follow this tutorial you will need:

  • A terminal

  • Your favorite text or code editor

  • Node.js with npm if you want to install the Enonic CLI via npm (other installers are also available)

You will install the Enonic CLI in the first chapter.

Tested versions

This version of the tutorial was produced and tested with the following stack:

Component Version

Enonic CLI

4.1.4

Enonic XP

7.16.11

Content Studio

5.4.17


Contents

Contents