Alchemy 5.0
Tags: rails, cms, release
Published: 2020-07-17 15:41:05

This is a huge release laying the foundation for Alchemy being a API first CMS for static site generators. While we truly believe in server site rendered HTML and will always support this, we also think that statically generated sites talking via APIs to the backend (aka the "JAM Stack") can be a huge improvement for modern frontends. That's why we made major changes to the internals of Alchemy that help you to better serialize your content and remove weirdness from the code base.

Before we begin thanks for all the contributions that made this release possible:

- [@mamhoff](https://github.com/mamhoff)
- [CandleScience](https://www.candlescience.com) for the ongoing support of my work

You really help to make Alchemy better every day.

Thanks for that ❤️

## Major changes

### Removed the single root page from the page tree

Alchemy always had a single root page under which all other pages were nested. Even the layout pages were nested under hidden layout root pages. This was very confusing and prevents us from making changes to the internal structure of Alchemy for features coming in the near future.

  ```
                 |
             Root Page
            /        \
  Language Root     Layout Root
  ├ Page 1            ├ Header
  | \                 └ Footer
  |  ├ Page 2
  |  └ Page 3
  ├ Page 4
  └ Page 5
  ```

  This has now been changed to a easier to understand page structure

  ```
       |            |        |
  Language Root   Header   Footer
  ├ Page 1
  | \
  |  ├ Page 2
  |  └ Page 3
  ├ Page 4
  └ Page 5
  ```

  - [#1837](https://github.com/AlchemyCMS/alchemy_cms/pull/1837)
  - [#1817](https://github.com/AlchemyCMS/alchemy_cms/pull/1817)
  - [#1812](https://github.com/AlchemyCMS/alchemy_cms/pull/1812)

### Remove Page visible attribute

  The page visible attribute was one of the most confusing attribute in Alchemy. It did way more things than you might have expected. Did you know that it also changed how URLs got created? Probably not. And that's why removed it.

  Want to make a page appear in the navigation? Create a Menu instead and put pages into it.

  In order to help with the upgrade make sure to update to Alchemy 4.6 first and use Menus and Tags instead to re-organize your pages if your page tree does not reflect the URL hierarchy.

  A rake task to help with the migration is available.

  ```
  bin/rake alchemy:upgrade:4.6:restructure_page_tree
  ```

  - [#1868](https://github.com/AlchemyCMS/alchemy_cms/pull/1868)

### Always create nested urls

  With the introduction of Menus and the removal of the Page visible flag we now completely separated the page tree from generating the navigation. That's why we now always generate a nested URL. Don't want to nest a pages URL? Just move it up in the tree.

  - Remove url_nesting config [#1872](https://github.com/AlchemyCMS/alchemy_cms/pull/1872) ([tvdeyen](https://github.com/tvdeyen))
  - Always create nested urls [#1844](https://github.com/AlchemyCMS/alchemy_cms/pull/1844) ([tvdeyen](https://github.com/tvdeyen))

### Configurable edit page preview per site

  This is a true benefit for all static sites running Alchemy as it's API. On a per site basis you can configure the host (and basic auth) to your static site and Alchemy will preview it in the build in page edit preview.

  - [#1877](https://github.com/AlchemyCMS/alchemy_cms/pull/1877)
  - [#1803](https://github.com/AlchemyCMS/alchemy_cms/pull/1803)

### Add a [`@alchemy_cms/admin` npm package](https://www.npmjs.com/package/@alchemy_cms/admin)

  Modern ES6 is everywhere. We started to work on the transition to a more modern JS stack. This is the first step.

  - [#1775](https://github.com/AlchemyCMS/alchemy_cms/pull/1775)
  - [#1853](https://github.com/AlchemyCMS/alchemy_cms/pull/1853)

### Add an On-Boarding Flow

  We removed the implicit creation of the sites and default languages. We now do this via the UI instead letting admins decide what to create instead.

  - [#1770](https://github.com/AlchemyCMS/alchemy_cms/pull/1770)
  - [#1763](https://github.com/AlchemyCMS/alchemy_cms/pull/1763)

### Removed element editor partials

  After being deprecated we removed the support for element editor partials. Alchemy now renders them for you. If you rely on passing custom options into element editors and the content editors please consider to use the `settings` hash on the `contents` definition of your elements or using a custom essence.

  - [#1653](https://github.com/AlchemyCMS/alchemy_cms/pull/1653)
  - [#1652](https://github.com/AlchemyCMS/alchemy_cms/pull/1652)
  - [#1651](https://github.com/AlchemyCMS/alchemy_cms/pull/1651)
  - [#1638](https://github.com/AlchemyCMS/alchemy_cms/pull/1638)

## Other minor changes

- Render nodes [#1831](https://github.com/AlchemyCMS/alchemy_cms/pull/1831) ([mamhoff](https://github.com/mamhoff))
- Add error flash to resource controller [#1827](https://github.com/AlchemyCMS/alchemy_cms/pull/1827) ([mamhoff](https://github.com/mamhoff))
- Translated root menus [#1825](https://github.com/AlchemyCMS/alchemy_cms/pull/1825) ([mamhoff](https://github.com/mamhoff))
- Add a quick Node select [#1821](https://github.com/AlchemyCMS/alchemy_cms/pull/1821) ([mamhoff](https://github.com/mamhoff))
- Make page language mandatory [#1818](https://github.com/AlchemyCMS/alchemy_cms/pull/1818) ([tvdeyen](https://github.com/tvdeyen))
- Multi language menus [#1774](https://github.com/AlchemyCMS/alchemy_cms/pull/1774) ([rmparr](https://github.com/rmparr))
- Update Fontawesome [#1759](https://github.com/AlchemyCMS/alchemy_cms/pull/1759) ([tvdeyen](https://github.com/tvdeyen))
- Sortable resources tables [#1744](https://github.com/AlchemyCMS/alchemy_cms/pull/1744) ([tvdeyen](https://github.com/tvdeyen))

## Other breaking changes

This release also removes all deprecated methods and classes from 4.6. In order to be able to smoothly upgrade please make sure to update to Alchemy 4.6 and remove all deprecations from your code base, then upgrade to Alchemy 5 and run the

```
bin/rake alchemy:upgrade
```

task.

- Remove active_record_5_1? method [#1854](https://github.com/AlchemyCMS/alchemy_cms/pull/1854) ([tvdeyen](https://github.com/tvdeyen))
- Remove old 4.4 upgrader class [#1814](https://github.com/AlchemyCMS/alchemy_cms/pull/1814) ([tvdeyen](https://github.com/tvdeyen))
- Remove Page.ancestors_for [#1813](https://github.com/AlchemyCMS/alchemy_cms/pull/1813) ([tvdeyen](https://github.com/tvdeyen))
- Remove legacy element serializer [#1810](https://github.com/AlchemyCMS/alchemy_cms/pull/1810) ([tvdeyen](https://github.com/tvdeyen))
- Remove timestamps from essences and contents [#1809](https://github.com/AlchemyCMS/alchemy_cms/pull/1809) ([tvdeyen](https://github.com/tvdeyen))
- Remove stamper from contents [#1808](https://github.com/AlchemyCMS/alchemy_cms/pull/1808) ([tvdeyen](https://github.com/tvdeyen))
- Remove Site ID from nodes [#1807](https://github.com/AlchemyCMS/alchemy_cms/pull/1807) ([mamhoff](https://github.com/mamhoff))
- Remove enforce_ssl [#1804](https://github.com/AlchemyCMS/alchemy_cms/pull/1804) ([tvdeyen](https://github.com/tvdeyen))
- Remove stamper from essences [#1802](https://github.com/AlchemyCMS/alchemy_cms/pull/1802) ([tvdeyen](https://github.com/tvdeyen))
- Remove acts_as_list from Content [#1798](https://github.com/AlchemyCMS/alchemy_cms/pull/1798) ([tvdeyen](https://github.com/tvdeyen))
- Remove Tasks::Helper module [#1754](https://github.com/AlchemyCMS/alchemy_cms/pull/1754) ([mamhoff](https://github.com/mamhoff))
- Remove old upgrade tasks [#1687](https://github.com/AlchemyCMS/alchemy_cms/pull/1687) ([tvdeyen](https://github.com/tvdeyen))
- Remove deprecated features [#1686](https://github.com/AlchemyCMS/alchemy_cms/pull/1686) ([tvdeyen](https://github.com/tvdeyen))
- Remove deprecations [#1656](https://github.com/AlchemyCMS/alchemy_cms/pull/1656) ([tvdeyen](https://github.com/tvdeyen))

## List of all changes

Have a look into the [Changelog](https://github.com/AlchemyCMS/alchemy_cms/blob/5.0-stable/CHANGELOG.md) for a list of all PRs merged into this release.