The NextJS Framework as a Site Engine
In ancient times, when the Internet was just emerging, sites were developed in pure HTML. This, however, is somewhat inconvenient. Therefore, special programs written in one of the backend languages (PHP, NodeJS, etc.), simplifying site development, appeared. A program that supports the website's operation is called the site engine.
Let's discuss the problems of sites built with pure HTML, how engines help deal with these problems, and what NextJS has to do with it.
Suppose you have a multi-page site in pure HTML. On each page of the site, you will have identical parts (for example, header, footer, sidebars) and differing parts (the page content, its title).
Suppose you need to make a certain change, say, to the site header. In this case, you need to make edits to all files containing that header. This, of course, is not very convenient.
This is why modern sites run on engines. Engines use a special approach. The essence of this approach is that one file with the general site layout is created. This file will contain the common parts of the site.
Depending on the requested URL, the site content corresponding to that URL will be inserted into a special place in the layout.
Besides the content, the page title usually changes as well. At the same time, the content and title are inserted into different places in the layout. This is also ensured by the site engine.
If SEO is important to us, then for each page of the site we must have our own meta description. It must also be inserted into its own place in the layout.
The NextJS framework works in the described manner. That is, it is the engine of our site. Accordingly, we have a special file somewhere containing the general site layout. We will study it in this section of the tutorial.