Comments

You must log in or register to comment.

emma wrote

Check out the assets/css/themes folder in the Postmill source code.

There used to be a CSS editor in Postmill itself, but themes weren't kept up to date, so changes to HTML templates would make the site look messed up for a lot of people.

6

notnull wrote

thanks for the reply emma.

I was wondering how to install a new theme. I tried by duplicating one of the folders inside of assets/css/themes, adding the new folder to assets/themes.json, and then running the bin/console postmill:sync-themes command.

This all seemed to work correctly, but then I got a 500 error for the server.

I tried removing the theme from themes.json and re-syncing the themes, but this showed a sql foreign_key constraint violation in the error output of the command. (I couldn't figure out how to fix this so I ended up dropping/recreating the db).

Is there a way to 'install' new themes, rather than editing the existing ones? And are there existing themes in the wild that one could download and install? I haven't been able to find any but maybe it's because I was looking specifically for Postmill themes rather than Raddle themes.

4

emma wrote

There's really no proper to install new themes currently. You can create new directories in assets/css/themes, rebuild assets, and the index.less/index.css file within will become the theme CSS. Then you need to change assets/themes.json to include the new theme you just created.

4

notnull wrote

Thanks, this seemed to work.

So for reference, the steps are:

  1. duplicate one of the existing theme directories in /assets/css/themes with a new name
  2. In the main Postmill install directory, run yarn run build-prod
  3. Edit assets/themes.json to add an entry for the new theme
  4. run bin/console postmill:sync-themes

I had run all of these steps before without running yarn run build-prod and it resulted in a nasty SQL error and a 500 server error.

2

emma wrote

Good effort, but a theme editor was implemented yesterday. Might wanna check that out.

4