Pages

Read an overview about Pages in Frontal

The core concept behind Frontal is to auto inject bundles within .html pages based on how the bundles property is configured within your frontal.config.js.

The default behaviour is that each page within the pages directory is processed by Frontal, and during development, these pages are exposed to the server with Fast Reloads and HMR enabled, for example, assume we have the following pages.

pages/index.html
pages/user/profile.html

these pages will be available during development via:

http://localhost/
http://localhost/user/profile.html

During the build process, each page within the pages directory is processed and copied over to the final build directory with nesting preserved.

When doing a $ frontal build the pages will be placed in the build directory as follows:

.frontal/index.html
.frontal/user/profile.html

This makes it more convenient for static hosting services to directly be able to find your pages and host your built project with no further configuration.

.html features

The static nature of working with HTML makes it very easy to get repetitive with your codes, but with Frontal, there are features that makes working with HTML a breath:

  • Don't repeat your content all over the place with the Partials feature.
  • Don't create messy HTML by pasting SVGs directly, instead use the SVGs feature.
Would You Like To KnowAbout Our Next Products & Free Tools?