chemins-de-la-transition / semapps

https://lescheminsdelatransition.org
Apache License 2.0
4 stars 0 forks source link

Make static pages configurable for each deployment #610

Open AngelMatilla opened 10 months ago

AngelMatilla commented 10 months ago

In the current repo there's a list of static pages, including the home page that are hardcoded as js and css files. You can find most of them (maybe all) here: https://github.com/chemins-de-la-transition/semapps/tree/master/frontoffice/src/pages

It would be necessary for the Regen4all project to be able to modify those pages (including the links to other pages).

My proposal (does not need to be the final solution) is that we make the URLs to the static pages configurable and that we locate the js and css files outside of the main repo (in order not to have to fork for each new project / implementation. Maybe not all files need to be located outside of the repo, and only those with content are the ones that can be removed.

A more elegant but also complex solution would be to make the pages configurable within the backoffice, but it might be too much effort for the desired result.

srosset81 commented 10 months ago

The HomePage and AboutPage are the only pages specific to CDLT. All other pages (for example https://lescheminsdelatransition.org/Page/mentions-legales/show) are markdown-formatted pages which can be edited on the backoffice.

AngelMatilla commented 10 months ago

What about the texts on the following pages:

In any case, it would be important to be able to customize the Home Page and About Page for our instance, so either we decide to fork the repo, or we create another sub-repo just with the pages

VincentFarcy commented 10 months ago

What about the texts on the following pages:

yes, all the my...pages only contain a unique title to be translated And the login/signup page a unique text to be translated

Tonfa commented 10 months ago

That's what I was trying to say in the meeting because I'm currently working on internationalization I didn't see static pages besides homepage and about (and yeah I'm translating all the other ones)

On Thu, 17 Aug 2023 at 12:00, VincentFarcy @.***> wrote:

What about the texts on the following pages:

yes, all the my...pages only contain a unique title to be translated And the login/signup page a unique text to be translated

— Reply to this email directly, view it on GitHub https://github.com/chemins-de-la-transition/semapps/issues/610#issuecomment-1681997267, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXQP66RGCOZSIJXB4XMFUDXVXTSBANCNFSM6AAAAAA3RFZAJA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

srosset81 commented 10 months ago

In any case, it would be important to be able to customize the Home Page and About Page for our instance, so either we decide to fork the repo, or we create another sub-repo just with the pages

These two pages are full React pages, so it will require a developer to customize them. The easiest solution for now would be to put the new HomePage and AboutPage in the /deploy/frontoffice/app/src/pages directory. When the Docker container is built, it will automatically overwrite the default CDLT ones.