Skip to content

Commit

Permalink
Add Opaque type blog post
Browse files Browse the repository at this point in the history
Summary: Add opaque type blog post & linking to medium

Reviewed By: gabelevi

Differential Revision: D5499093

fbshipit-source-id: 9c67e85739762d0049d263a2764252bc31b9da59
  • Loading branch information
jbrown215 authored and facebook-github-bot committed Jul 27, 2017
1 parent a74b034 commit 73406ec
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
4 changes: 4 additions & 0 deletions website/_includes/nav-posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
{{post.short-title | default: post.title}}
<span class="sr-only">(current)</span>
</strong>
{% elsif post.medium-link %}
<a class="nav-link" href="{{post.medium-link}}">
{{post.short-title | default: post.title}}
</a>
{% else %}
<a class="nav-link" href="{{site.baseurl}}{{post.url}}">
{{post.short-title | default: post.title}}
Expand Down
5 changes: 5 additions & 0 deletions website/_layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@
---

{{content}}
{% if page.medium-link %}
<a href={{page.medium-link}}>
Read more on Medium &rarr;
</a>
{% endif %}
8 changes: 8 additions & 0 deletions website/_posts/2017-07-27-Opaque-Types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Opaque Type Aliases"
short-title: "Opaque Type Aliases"
author: "Jordan Brown"
medium-link: "https://medium.com/flow-type/hiding-implementation-details-with-flows-new-opaque-type-aliases-feature-40e188c2a3f9"
---
Do you ever wish that you could hide your implementation details away
from your users? Find out how opaque type aliases can get the job done!
17 changes: 14 additions & 3 deletions website/blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@
{% for post in site.posts %}
<div class="blog-post">
<h3>
<a href="{{site.baseurl}}{{post.url}}">
{{post.title}}
</a>
{% if post.medium-link %}
<a href="{{post.medium-link}}">
{{post.title}}
</a>
{% else %}
<a href="{{site.baseurl}}{{post.url}}">
{{post.title}}
</a>
{% endif %}
</h3>

<p class="small text-muted">
Expand All @@ -25,6 +31,11 @@ <h3>
</div>
{% else %}
{{ post.content }}
{% if post.medium-link %}
<a href="{{post.medium-link}}" >
Read more on Medium &rarr;
</a>
{% endif %}
{% endif %}
</div>

Expand Down

0 comments on commit 73406ec

Please sign in to comment.