How to Get the Current Page URL on Ghost Blogging Platform


Get the Current Page URL on Ghost Blogging Platform

Get the Current Page URL on Ghost Blogging Platform

How to Get the Current Page URL on Ghost Blogging Platform

In Today, Ghost Tutorial series part we see about How to Get the Current Page URL on Ghost Blogging Platform.

Here are the Steps to  Get the Current Page URL on Ghost Blogging Platform

Get the Current Page URL on Ghost Blog

{{url}} – it is the helper for all Process to Get the Homepage/Post/page/Blog URL

Here is Tag to get the Current Page URL

{{url absolute="true"}}

This tag will call the current page/post URL  we can use this tags on share buttons and third party widget which needs the current page URL of your Post

How to Get Social Share Buttons URL on Ghost Blog?

Here I am going to List the Share Buttons with {{url}} tag which help us to Get the current page URL for Social Bookmarks

Facebook

<a href="https://www.facebook.com/sharer/sharer.php?u={{url absolute="true"}}">Share on Facebook</a>

Twitter

<a href="https://twitter.com/intent/tweet?text={{encode title}}&amp;url={{url absolute="true"}}">Twitter</a>

Google+

<a href="https://plus.google.com/share?url={{url absolute="true"}}">Google+</a>

Whatsapp

<a href="whatsapp://send?text={{encode title}} &rarr; {{url absolute="true"}}">Whatsapp</a>

Pinterest

<a href="https://pinterest.com/pin/create/button/?url={{url absolute="true"}}{{#if image}}&media={{@blog.url}}{{image}}{{/if}}&description={{excerpt words="20"}}" target="_blank">Pin it</a>

 

  • {{url absolute=”true”}} – Get the Current Post URL for the Share Buttons
  • For Twitter we use to {{encode title}} to Get the Current page title.Encode Will help us to Give the proper output in tweet share without Any Mess up’s in title texts.
  • For WhatsApp we use {{title}} to Get the Current page title

How to Get the Blog URL in Ghost Blogging Platform?

Here is the Tag for Getting our Ghost Blog URL

{{@blog.url}}

These tags are Used in Logo, Footers, RSS Feeds.

Footer Example

<section class="copyright"><a href="{{@blog.url}}">{{@blog.title}}</a> &copy; {{date format="YYYY"}}</section>

Logo Example

<a class="blog-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>

RSS Feed Example

<a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/">Subscribe</a>

Ghost Blog is already having the inbuilt RSS feed just open your feed like example.com/rss if you want to add this inside on your theme files add Just like this href=”{{@blog.url}}/rss/.”

Get the Current Page URL on Ghost

SNOTagUsage
1{{url}} Global path for all
2{{url absolute=”true”}} Get Current Page URL
3{{@blog.url}} Get Blog URL

These Tags are applied in

  • Share Buttons
  • Menu Links
  • Images
  • canonical URL
  • RSS Feed
  • Widgets

Hope this Guide will help you to understand the URL GET Method on Ghost Blogging Platform

Here is the Official Ghost Blog Documentation for – URL Handling

Ghost Blog CMS Guides for you

 



Was this article helpful?
Thanks!

Your feedback helps us improve Allwebtuts.com