Repo Organization & Structure

PageBuilder is framework-agnostic, which means that you can write code in any language or framework on top of the platform. However, this also means that each PageBuilder feature repository must follow the same general structure in order for PageBuilder to understand the configurations.

At the top level, you will find numerous named directories that tell PageBuilder where to look for certain types of information.

Why this structure?

Under the hood, PageBuilder features are series of JSON files that tell PageBuilder what files to use as templates and dependencies when the platform detects a feature. Top-level directories for chains, features, output-types, and layouts help ensure that PageBuilder looks in the right place for each type of file and categorizes them appropriately.

Within the layouts and output-types directories, you must include named json files that correspond which each of your layouts and output-types, respectively. These files should not be placed in any sub-directories. Within layouts, however, you may include a templates directory to house the HTML files that correspond to your templates.

Within the chains directory, each chain should be organized in its own named sub-directory. Within each sub-directory, you should include a chain-config.json file and a chain.jsp, which will serve as the template for the chain. You may include optional CSS and JS files, but we recommend finding ways of integrating CSS and JS changes into the overall framework, rather than writing custom code for each chain.

Within the features directory, files should be organized into overarching categories to contain different types of features. For example, files in the features/global directory should be designed for global use (i.e. any page of the site) whereas features in the features/article directory may be designed only for use on article templates. Similarly, we use the features/utilities directory to categorize features that are included within other features, such as a video player that should be integrated into a playlist, an inline player, and the promo art. Similar to chains, each feature requires a config.json and a feature.jsp; other files may be included, but nothing else is required (To see a feature with additional files included in it, check out the article/body feature!)

results matching ""

    No results matching ""