Remove the templates_dir warning #244

Closed
opened 2018-09-25 19:43:00 +00:00 by elegaanz · 5 comments
elegaanz commented 2018-09-25 19:43:00 +00:00 (Migrated from github.com)

At each launch, Rocket tells us:

Error: missing configuration key: 'template_dir'
    => Warning: Using default templates directory '"/home/baptiste/Projects/plume/templates"'

And many people think it is an error, and that something went wrong during the installation. We should either set it during the setup with the .env, or use a custom Rocket config from Rust code.

Plume version (and/or commit): 0.2.0

At each launch, Rocket tells us: ``` Error: missing configuration key: 'template_dir' => Warning: Using default templates directory '"/home/baptiste/Projects/plume/templates"' ``` And many people think it is an error, and that something went wrong during the installation. We should either set it during the setup with the `.env`, or use a custom Rocket config from Rust code. Plume version (and/or commit): 0.2.0
igalic commented 2018-09-28 12:15:40 +00:00 (Migrated from github.com)

It feels like we should make the templates (and static) dir its own repository so people can fork them to make their own themes

It feels like we should make the `templates` (and static) dir its own repository so people can fork them to make their own themes
elegaanz commented 2018-09-28 12:21:01 +00:00 (Migrated from github.com)

Actually, I would like to use askama for templates in the future, which would make it harder to put them in their own repository… However, theming with some CSS could be allowed in the future too.

Maybe we could still put them in another repository and "load" them with a git submodule (So if you want custom templates, you would clone Plume without the submodule, then clone in the template dir (or whatever) the repo of the theme we want…)

Actually, I would like to use [askama](https://github.com/Plume-org/Plume/issues/161) for templates in the future, which would make it harder to put them in their own repository… However, theming with some CSS could be allowed in the future too. Maybe we could still put them in another repository and "load" them with a git submodule (So if you want custom templates, you would clone Plume without the submodule, then clone in the `template` dir (or whatever) the repo of the theme we want…)
igalic commented 2018-09-28 12:36:05 +00:00 (Migrated from github.com)

Actually, I would like to use askama for templates in the future, which would make it harder to put them in their own repository… However, theming with some CSS could be allowed in the future too.

can you elaborate on why it would make it harder?

> Actually, I would like to use askama for templates in the future, which would make it harder to put them in their own repository… However, theming with some CSS could be allowed in the future too. can you elaborate on *why* it would make it harder?
elegaanz commented 2018-09-28 17:36:26 +00:00 (Migrated from github.com)

Templates are embedded in the binary with askama, they are not read from the file system when the app starts. So if you want to change them you should recompile the whole app (well actually it's true that's it is not more complicated, only a bit longer).

Templates are embedded in the binary with askama, they are not read from the file system when the app starts. So if you want to change them you should recompile the whole app (well actually it's true that's it is not more complicated, only a bit longer).

Fixed by #327

Fixed by #327
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#244
No description provided.