Create Link for Static Page


I’m brand new to ghost so bear with me.
I would like to create an href to a static page but am having an issue doing so.
Here is what I need to do.
<a href="<INeedPrefix>/contact"><i class="fa fa-envelop"></i></a>

How do i get the domain prefix? I don’t want to hard code it (shame on me if i do)? I’ve been looking around the docs and I don’t see anything. The only thought I have is to use #get to fetch a page by name, but can that be done?

Thank you

1 Like


Please follow my screenshot. At first #1 you have to select Turn this post into a page option and then add your custom page url there what you want as prefix/slug.

I hope it will help you. If you have any other question, feel free ask here.

1 Like

After doing what @themeix said, create a page-nameofpage.hbs file. There, your page has been created!

To insert a link, you must use the page slug generated in Ghost within the href attribute.

Example: <a href="/mypage/"><i class="fa fa-envelop"></i></a>

Thank you Matheus and themeix. For some reason I was thinking I needed the url prefix when it’s relative. sigh.

Thanks for the responses.

fwiw you can also use the {{@blog.url}} helper to get the base URL

1 Like

Thanks all for your responses. i was having similar questions and your answers were helpful to me.