Skip to content

Commit

Permalink
Migrated from @blog -> @site
Browse files Browse the repository at this point in the history
no issue

- This rename is due to new {{@site}} alias introduced in Ghost (TryGhost/Ghost@dd1cf5f) as {{@blog}} variable is deprecated now, and will be removed in v3
  • Loading branch information
naz committed Jan 8, 2019
1 parent cc032f9 commit 8f31b74
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions default.hbs
Expand Up @@ -35,21 +35,21 @@
{{navigation}}
</nav>
<div class="site-head-center">
{{#if @blog.logo}}
<a class="site-head-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>
{{#if @site.logo}}
<a class="site-head-logo" href="{{@site.url}}"><img src="{{@site.logo}}" alt="{{@site.title}}" /></a>
{{else}}
<a class="site-head-logo" href="{{@blog.url}}">{{@blog.title}}</a>
<a class="site-head-logo" href="{{@site.url}}">{{@site.title}}</a>
{{/if}}
</div>
<div class="site-head-right">
<div class="social-links">
{{#if @blog.facebook}}
<a href="{{facebook_url @blog.facebook}}" title="Facebook" target="_blank" rel="noopener">Facebook</a>
{{#if @site.facebook}}
<a href="{{facebook_url @site.facebook}}" title="Facebook" target="_blank" rel="noopener">Facebook</a>
{{/if}}
{{#if @blog.twitter}}
<a href="{{twitter_url @blog.twitter}}" title="Twitter" target="_blank" rel="noopener">Twitter</a>
{{#if @site.twitter}}
<a href="{{twitter_url @site.twitter}}" title="Twitter" target="_blank" rel="noopener">Twitter</a>
{{/if}}
<a href="https://feedly.com/i/subscription/feed/{{@blog.url}}/rss/" title="RSS" target="_blank" rel="noopener">RSS</a>
<a href="https://feedly.com/i/subscription/feed/{{@site.url}}/rss/" title="RSS" target="_blank" rel="noopener">RSS</a>
</div>
</div>
</div>
Expand All @@ -66,7 +66,7 @@

{{!-- The footer at the very bottom of the screen --}}
<footer class="site-foot">
&copy; {{date format="YYYY"}} <a href="{{@blog.url}}">{{@blog.title}}</a> &mdash; Published with <a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a>
&copy; {{date format="YYYY"}} <a href="{{@site.url}}">{{@site.title}}</a> &mdash; Published with <a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a>
</footer>

</div>
Expand All @@ -76,10 +76,10 @@
<div id="subscribe" class="subscribe-overlay">
<a class="subscribe-overlay-close" href="#"></a>
<div class="subscribe-overlay-content">
{{#if @blog.logo}}
<img class="subscribe-overlay-logo" src="{{@blog.logo}}" alt="{{@blog.title}}" />
{{#if @site.logo}}
<img class="subscribe-overlay-logo" src="{{@site.logo}}" alt="{{@site.title}}" />
{{/if}}
<h1 class="subscribe-overlay-title">Subscribe to {{@blog.title}}</h1>
<h1 class="subscribe-overlay-title">Subscribe to {{@site.title}}</h1>
<p class="subscribe-overlay-description">Stay up to date! Get all the latest &amp; greatest posts delivered straight to your inbox</p>
{{subscribe_form placeholder="youremail@example.com"}}
</div>
Expand Down
4 changes: 2 additions & 2 deletions error.hbs
Expand Up @@ -3,7 +3,7 @@
<header class="page-head error-head">
<h1 class="page-head-title">{{code}}</h1>
<p class="page-head-description">{{message}}</p>
<a class="error-link" href="{{@blog.url}}">Go to the front page →</a>
<a class="error-link" href="{{@site.url}}">Go to the front page →</a>
</header>

{{#if errorDetails}}
Expand All @@ -24,4 +24,4 @@
</ul>
</section>
</div>
{{/if}}
{{/if}}
4 changes: 2 additions & 2 deletions index.hbs
Expand Up @@ -3,9 +3,9 @@
into the {body} of the default.hbs template --}}

{{#is "home"}}
{{#if @blog.description}}
{{#if @site.description}}
<header class="page-head">
<h2 class="page-head-title">{{@blog.description}}</h2>
<h2 class="page-head-title">{{@site.description}}</h2>
</header>
{{/if}}
{{/is}}
Expand Down
2 changes: 1 addition & 1 deletion post.hbs
Expand Up @@ -24,7 +24,7 @@
{{!-- Email subscribe form at the bottom of the page --}}
{{#if @labs.subscribers}}
<section class="subscribe-form">
<h3 class="subscribe-form-title">Subscribe to {{@blog.title}}</h3>
<h3 class="subscribe-form-title">Subscribe to {{@site.title}}</h3>
<p>Get the latest posts delivered right to your inbox</p>
{{subscribe_form placeholder="youremail@example.com"}}
</section>
Expand Down

5 comments on commit 8f31b74

@pascalandy
Copy link

@pascalandy pascalandy commented on 8f31b74 Jan 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gargol,

I'm running Ghost v2.9.1 This breaks my site.
I think it would be better to introduce this breaking change under a branch called v3 instead of master?

Thank you!

@ErisDS
Copy link
Member

@ErisDS ErisDS commented on 8f31b74 Jan 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pascalandy You should always upgrade to the latest version of Ghost before following any documentation or using any of the supporting tools or themes we provide as they are all always written for the latest and greatest version of Ghost.

@pascalandy
Copy link

@pascalandy pascalandy commented on 8f31b74 Jan 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
I agree with your point of running the latest version of Ghost.

My point is that I wasn't aware that breaking change could happen between minor versions. 2.9.x —> 2.10.x in this case.

Thank you!

@ErisDS
Copy link
Member

@ErisDS ErisDS commented on 8f31b74 Jan 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no breaking change between Ghost 2.9.x and 2.10.x. There were feature additions in the form of a brand new API, which is what minor versions indicate. The old API still exists, we've worked really hard to make that possible.

Every one of our official themes were updated to use the new features - that's standard practice - the latest version of our themes is always only compatible with the latest version of Ghost.

Furthermore, the change in this commit hasn't been released yet.

@pascalandy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, my apology on this. It makes sense now.
Thanks for everything!

the latest version of our themes is always only compatible with the latest version of Ghost.

Please sign in to comment.