Proton

CLI Tool for compiling web pages and email

Just like an actual proton is only one part of an atom, Proton is just one piece of the core for your project. It is not intended to be a full fledged CMS. It does zero management of your JavaScript, CSS, Assets or any kind of API that you website may require. Proton can compile your webpage assets into HTML, PHP or whatever language you may require.

Proton Features

Here are a list of the main features of Proton and how it can help you.

Reduce NPM Dependencies

Managing NPM dependencies has become a difficult task. Both of our development tools and front end libraries are managed by the same package manager. Too often we have to deal with dependency conflicts between libraries and tools that we want to use. Proton is built with PHP. This means that it's dependencies lay 100% outside of your project's NPM dependency chain.

Twig Templates

Proton leverages Twig to bring you a powerful, flexible and fast templating system. Check out the Twig Templates for Designers docs. If you like Handlebars, you will be blown away with Twig.

Twig templates can be written in multiple formats. Markdown and Pug will be compiled down to HTML. All other languages, like HTML and PHP, will pass through into the compiled webpages.

You can add front matter to your templates in order to customize options and provide page specific data.

Template Inheritance

There are 4 levels of templates that you can use: layouts, pages, partials and macros.

Pages are the core template type. You will create pages for each public page that you want on your site (batching aside, see below). Each page can inherit from one layout. Partials and macros allow you to create reusable components that you can use across all of your pages.

Data Storage

Data can be stored in either YAML or JSON files. You can have multiple data files named differently. All data files are stored in one giant data structure during page compilation. This means that every page has full access to all pages.

Data stored in the YAML frontmatter on each page will override the global data.

Batch Generate Pages

You can create a single page that can be used to generate multiple pages for each item within a data set. For example, if you can define an array of products inside of your data. You can then create a page for each product by applying these data fro each to the one page template that you created.