https://github.com/brandocms/brando
A CMS of sorts.
https://github.com/brandocms/brando
Last synced: about 1 year ago
JSON representation
A CMS of sorts.
- Host: GitHub
- URL: https://github.com/brandocms/brando
- Owner: brandocms
- License: other
- Created: 2015-01-17T10:33:30.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2025-05-02T14:07:19.000Z (about 1 year ago)
- Last Synced: 2025-05-02T15:25:07.113Z (about 1 year ago)
- Language: Elixir
- Homepage:
- Size: 24.1 MB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 87
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- open-production-web-projects - Brando - A CMS of sorts. (Elixir / Phoenix)
README
A helping hand.
*EXPERIMENTAL, NOT RECOMMENDED TO USE BEFORE IN MORE STABLE FORM!*
## Install
Start by creating a new Phoenix project:
$ mix phx.new my_project
Run the install script:
$ wget https://raw.githubusercontent.com/brandocms/brando/master/install.sh && chmod +x install.sh && ./install.sh
Go through `config/brando.exs`.
To use Brando's error views, add to your Endpoint's config (in prod.exs):
```elixir
config :my_app, MyApp.Endpoint,
render_errors: [
formats: [html: Brando.ErrorHTML, json: Brando.ErrorJSON], layout: false
],
```
*Remember to switch out your ports and configure SSL in `etc/nginx/prod.conf`*
## Dependencies
* `sharp`/`sharp-cli` for image processing.
Installation instructions: https://github.com/brandocms/brando/issues/183
* `gifsicle` for GIF resizing.
## I18n
Brando uses Gettext for i18n.
To extract and merge your frontend and backend translations:
(Example for norwegian)
$ mix gettext.extract --merge priv/gettext/frontend --locale no --plural-forms-header nplurals="2; plural=(n != 1);"
$ mix gettext.extract --merge priv/gettext/backend --locale no --plural-forms-header nplurals="2; plural=(n != 1);"
## Generators
Generate blueprint
$ mix brando.gen.blueprint
Generate templates:
$ mix brando.gen
## Serve static from DO Spaces
Setup Endpoint for `prod.exs`
```elixir
config :my_app, hmr: false
config :my_app, MyAppWeb.Endpoint,
static_url: [
scheme: "https",
host: "cdn.univers.agency",
path: "/my_app/static",
port: 443
]
config :ex_aws, :s3, %{
access_key_id: System.get_env("AWS_ACCESS_KEY_ID"),
secret_access_key: System.get_env("AWS_SECRET_ACCESS_KEY"),
scheme: "https://",
host: %{"fra1" => "SPACES_NAME.fra1.digitaloceanspaces.com"},
region: "fra1"
}
```
Add to Dockerfile build:
```bash
$ mix brando.static.deploy
```