Hi - noobie question,
I have gone through what I think are all the instructions to add a new custom page template so I can have multiple template options – I am testing locally on my Macbook. But when I go to restart the webserver and restart Ghost the new page doesn’t show up as an option in the UI. I am not sure what I am doing wrong or if this template JOURNAL doesn’t support or respond or allow new custom page templates.
My template name in teh DIR is: custom-page.hbs
This was the page naming syntax i think i read correctly.
screenshot of the typical DIR structure on a MacBook webserver. Note the arrow on the image. The ghost Admin UI works great and default features all work.
What am I doing wrong?
I want the the new custom page template to who up in the ADD PAGE menu.
Is this even doable?
Thank you for your guidance and help
You need to BOTH restart Ghost and do a reload in your browser to get the option to show up in the editor. If you’ve done that, then…
I’m suspicious that custom-page may be running afoul of Ghost’s expectations for naming in some way. Can you try giving it a different name (i.e. ‘custom-mypage.hbs’), restart Ghost, and see if it starts showing up?
Thank you Cathy - None of that worked. I am not sure what’s going on. I renamed the page per your suggestion, Restarted both the webserver, and ghost and cleared my cache on chrome. Same behavior.
I do not need to reload the theme and activate do I? that seems so painful if so.
You shouldn’t need to reinstall, no.
- The file’s permissions and/or ownership are wacky. If you to
ls -ltr in that folder, does it match the other files?
- The file is actually named something like
custom-page.hbs , with a non-obvious trailing space on the end that is causing Ghost not to recognize it. (I’ve seen that one!)
- The files you’re editing aren’t actually the ‘live’ version of the files. If you make an obvious change to index.hbs or post.hbs, do you see it on the server when you reload the page? If not, you’re editing the wrong files. (What I see in your screenshot looks like IF the active theme is journal-v11-2023.)
Hi Again Cathy – thank you for taking this much time.
- Yes the permissions match other files
- no trailing space. I have renamed the page to many different names where xxxx is something else custom-xxxx.hbs
- if I change index.hbs and copy it, modify it, and rename the original to something else the new index.hbs is changed - same with the page.hbs - so not sure what is happening.
Here is a screenshot of where i created a copy of index and changed it. - everything modified.