symphonycms / docs.getsymphony.com

The official repository for the Symphony CMS documentation site
2 stars 2 forks source link

Linking between pages #16

Closed tachyondecay closed 9 years ago

tachyondecay commented 9 years ago

What is the best way to do this?

I tried using {% post_url %} at first, until I realize that only applies to posts, not pages….

Right now I’m just hard-coding the link, but that presents issues with the base URL: I have to hardcode /docs.symphony.com/ into the links for now, only to remove it when we change to a subdomain, or the links don’t work.

johnpuddephatt commented 9 years ago

Using {% site.baseurl %} should work – based on the current setup it returns docs.getsymphony.com.

On 27 Jan 2015, at 16:07, Ben Babcock notifications@github.com wrote:

What is the best way to do this?

I tried using {% post_url %} at first, until I realize that only applies to posts, not pages….

Right now I’m just hard-coding the link, but that presents issues with the base URL: I have to hardcode /docs.symphony.com/ into the links for now, only to remove it when we change to a subdomain, or the links don’t work.

— Reply to this email directly or view it on GitHub https://github.com/symphonycms/docs.getsymphony.com/issues/16.

tachyondecay commented 9 years ago

Great minds think alike! I just tried that after consulting the Jekyll docs, and it does indeed work.

bernardodiasc commented 9 years ago

{% site.baseurl %} will return /docs.getsymphony.com (with the slash) :)