Skip to content

Releases: foundation/proton

Proton Beta 6

17 Jun 15:58
v0.6.0
8627ff6
Compare
Choose a tag to compare
Proton Beta 6 Pre-release
Pre-release

Updates

  • Site data and page data are no longer merged. They will be kept separate. Details below.
  • Added support for PROTON_ENV environment variable. Details below
  • New twig filters added
    • ksort - sort array by keys
    • krsort - reverse sort array by keys
    • count - count elements in an array
  • Dot files are now skipped when processing templates and data
  • Various updates to composer configs
  • Improved pretty output for h1-h6

Site Data

All data that is imported from the data folder is now scoped under {{ data.mykey }}. You will need to add data to all of your existing macros that you have in your templates. The reason for this change was to not conflict with any variables that you may want to create inside of your templates.

Page Data

Page data no longer gets merged with the site level data. Page data can be accessed through the page scope {{ page.mykey }}.

Environment Variables

The PROTON_ENV environment variable can be used to control template data for production vs development use. You can access this from your templates via {{ proton.environment }}. One use case for this would be to add analytics or embed code to the production build only.

{% if proton.environment == "production" %}
<script>
... insert analytics code here ...
</script>
{% endif %}

The default environment is development. You can pass a new environment to proton at run time.

$ PROTON_ENV=production proton build

New Twig filters

Here are examples of the new twig filters added.

// sort groups by keys
{% for group, teams in groups | ksort %}

// reverse sort groups by keys
{% for group, teams in groups | krsort %}

// get a count of items in groups
{% set count = groups | keys | count %}

Live website built with Proton

As a fun side project, https://www.worldcupbrackets.info/ was built with Proton. You can access the full source code for this at https://github.com/joeworkman/worldcupbrackets.info

Full Changelog: v0.5.0...v0.6.0

Proton Beta 5

22 Dec 04:26
v0.5.0
4810fd0
Compare
Choose a tag to compare
Proton Beta 5 Pre-release
Pre-release

Updates

  • New watch command allows you to spin up a local server and recompile templates as they are updated.
  • New init --template option allows you to create a new project based off a pre-defined template. Only sites works as an value for now.
  • New Proton template with Foundation for Sites: https://github.com/foundation/proton-sites-template
  • Sitemap fixes
  • Better file cleanup

Watch

The new watch feature requires the following NPM packages to be installed in your repo.

yarn add browser-sync chokidar -D

There are 2 new configuration values for this:

npmBuild: yarn
devserver: browsersync
  • npmBuild is the command that would be run via terminal to build the NPM released for this site. The default is yarn build.
  • devserver has two possible options at this time: browsersync and php

Init Template

Right now, only one template exists for Proton. It uses Foundation for Sites as its base. You can create a new project using this template via terminal. The folder that you create this project in must be blank.

$ proton init --template=sites
$ yarn install

You can also pass any GitHub URL to the template option and it will clone that repo as a template. Feel free to start creating your own templates for proton.

How to Update

You can update proton simply by running proton self-update. Enjoy the update!

Proton Beta 4

17 Dec 21:37
v0.4.0
49c001d
Compare
Choose a tag to compare
Proton Beta 4 Pre-release
Pre-release

Updates

  • New docs at https://docs.page/foundation/proton
  • New Assets api to copy non-template content into your generated site
  • Generate a sitemap.xml file for all pages
  • Fixed a bug with data processing for batch generated pages

You can update proton simply by running proton self-update. Enjoy the update!

Proton Beta 3

15 Dec 18:29
v0.3.0
f37ff3d
Compare
Choose a tag to compare
Proton Beta 3 Pre-release
Pre-release

The release makes proton leaps and bounds better than beta 2. If you have not given proton a shot, definitely start playing with v0.3.0.

Updates

  • The README file is packed full of information. Anyone want to help make it better?
  • New init command helps you get a new proton project started.
  • New data commands helps you visualize that data used to compile a page.
  • Code completely refactored into more sustainable classes.
  • More misc fixes and improvements.

You can update proton simply by running proton self-update. Enjoy the update!