replace metadata in site publisher's templates

Masiar

Registered
Sep 10, 2017
3
0
1
Lodz, Poland
cPanel Access Level
Root Administrator
Hello,

it is my first post on cpanel's forum so i want to say hello to all cpanel's community :)

I work on the translations site publisher themes by edit meta.json and index.html.tt files in
Code:
/usr/local/cpanel/etc/site_templates/
Last night I do cPanel updates, what in resulted overwriting of these files in all default templates.

Is there any way to protect translated files against overwriting by updating in the future?

Kind regards
 

sysdop

Member
Sep 10, 2017
18
1
3
International
cPanel Access Level
Root Administrator
@Masiar You can lock the folder with the chattr +i -R /usr/local/cpanel/etc/site_templates/ command, but it is not a recommended practice, ideally you should contact the cPanel team via a ticket, not find a solution as this is the only option I see possible first of all.
 

cPanelAdamF

cPanel Product Owner
Staff member
Mar 21, 2013
256
69
153
Houston TX
cPanel Access Level
DataCenter Provider
Twitter
@Masiar - Currently there isn't a mechanism to translate strings in Site Publisher. You can, however, copy the contents of /usr/local/cpanel/etc/site_templates into /var/cpanel/customizations/site_templates/ and make any updates you want there. Your customers will see both english (from the cpanel-provided versions) AND your translated templates when they open the site publisher interface.

Contents of /var/cpanel/customizations/site_templates/ will be totally ignored during any update process, so you won't have to freeze any folders or write upcp hooks or anything.
 

cPanelAdamF

cPanel Product Owner
Staff member
Mar 21, 2013
256
69
153
Houston TX
cPanel Access Level
DataCenter Provider
Twitter
yeah, I agree, it's not the greatest solution in the world.

As far as the future of Site Publisher goes, the only conversations we've had internally about it is to potentially iterate on it in the direction of one of the off-the-shelf static-site-generators. Like jekyll or Grav - A Modern Flat-File CMS | Grav in order to open up tons more templates and participate in those communities. There's some really great sites out there built using static-site generation and Site Publisher was an experiment to see how much interest our end-users would have in those.

Internally we typically do a big strategy conversation after the new year so I may have more news then.
 
  • Like
Reactions: Masiar