How do I use Starter's custom membership templates?

I have searched Starter’s README as well as the Ghost developer docs, but I cannot find any information on how to utilize the custom membership templates located in the members directory, e.g. members/signup.hbs. I have tried adding routes for them, but that does not work. Each route returns a “missing template” error when visited. Am I missing something?

I think that when I played with the starter I moved the files out of membership and renamed them as custom-(name), so that I could create a page for each one. If you’re self hosting, you likely need to restart ghost to trigger scanning the hbs files again.

Thanks, Cathy. I may follow a similar path at this rate. I am indeed self hosting, and I understand that the server needs to be restarted to detect new templates (I do this a lot in local development).

I still wish I could figure out why some of the official themes use this members directory. I don’t see anything in the documentation. Mysterious!

I will leave this open for now. Perhaps someone else knows the answers I seek.

There’s nothing mysterious here — it’s just for the sake of organization, as it allows you to keep all your member-related templates in a single folder.

In routes.yaml, you can then do something like this:

  /signin/: members/signin
  /signup/: members/signup
  /account/: members/account

Thanks for clearing that up. So there’s nothing automated happening here, like the way partials/navigation.hbs automatically overrides the default template? That’s where my mind went when I saw the members folder since it is in the official starter theme.

I think it would be useful to add a note about this in Starter’s readme so people know the required setup. Seems like a good opportunity to introduce theme developers to custom routing, too. :slight_smile:

1 Like

Good idea! Our docs on custom routing are here: Ghost Themes - Dynamic URLs & Routing

1 Like