Skip to content

Commit

Permalink
Fixed url generation for the posts
Browse files Browse the repository at this point in the history
Signed-off-by: Anil Vishnoi <[email protected]>
  • Loading branch information
vishnoianil committed Mar 5, 2017
1 parent fe66c6c commit d818ca8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
2 changes: 0 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ theme:
twitter: vishnoianil_
facebook: vishnoianil
gplus: +vishnoianil
dribble:
pinterest:

# Enable share buttons on post footer
show_share_buttons: true
Expand Down
4 changes: 2 additions & 2 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{% endfor %}

<a class="sidebar-nav-item"
href="http://github.com/{{ site.theme.social.github }}"
href="https://github.com/{{ site.theme.social.github }}"
target="_blank">
GitHub/Download
</a>
Expand All @@ -53,7 +53,7 @@

<div class="sidebar-info small">
<p>
Powered by <a href="http://jekyllrb.com" target="_blank">Jekyll</a>
Powered by <a href="https://jekyllrb.com" target="_blank">Jekyll</a>
</p>
</div>

Expand Down
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="posts">
{% for post in paginator.posts %}
{% assign post_url = post.url | append: '/' | replace: '//', '/' | prepend: site.baseurl | prepend: site.url | %}
{% assign post_url = post.url | replace: '//', '/' | prepend: site.baseurl | prepend: site.url | %}
<article class="post">

{% if post.banner_image %}
Expand All @@ -19,7 +19,7 @@
{% endif %}

<h2 class="post-title">
<a href="{{ post.url | append: '/' | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
<a href="{{ post.url | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
{{ post.title }}
</a>
</h2>
Expand All @@ -34,7 +34,7 @@ <h2 class="post-title">
</p>

{{ post.excerpt }}
<a href="{{ post.url | append: '/' | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
<a href="{{ post.url | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
Continue reading »
</a>
</article>
Expand All @@ -61,7 +61,7 @@ <h2 class="post-title">

<script type="application/ld+json">
{
"@context": "http://schema.org",
"@context": "https://schema.org",
"@type": "WebSite",
"url": "{{ '' | prepend: site.baseurl | prepend: site.url | append: '/' }}"
}
Expand Down
6 changes: 3 additions & 3 deletions papers.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ permalink: /papers/
</article>

{% for paper in site.categories.papers %}
{% assign post_url = paper.url | append: '/' | replace: '//', '/' | prepend: site.baseurl | prepend: site.url %}
{% assign post_url = paper.url | replace: '//', '/' | prepend: site.baseurl | prepend: site.url %}

<article class="post">
<h2 class="post-title">
<a href="{{ paper.url | append: '/' | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
<a href="{{ paper.url | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
{{ paper.title }}
</a>
</h2>
Expand All @@ -27,7 +27,7 @@ permalink: /papers/
</p>

{{ paper.excerpt }}
<a href="{{ paper.url | append: '/' | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
<a href="{{ paper.url | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
Continue reading »
</a>
</article>
Expand Down
6 changes: 3 additions & 3 deletions patents.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ permalink: /patents/
</article>

{% for patent in site.categories.patents %}
{% assign post_url = patent.url | append: '/' | replace: '//', '/' | prepend: site.baseurl | prepend: site.url %}
{% assign post_url = patent.url | replace: '//', '/' | prepend: site.baseurl | prepend: site.url %}

<article class="post">
<h1 class="post-title">
<a href="{{ patent.url | append: '/' | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
<a href="{{ patent.url | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
{{ patent.title }}
</a>
</h1>
Expand All @@ -26,7 +26,7 @@ permalink: /patents/
</p>

{{ patent.excerpt }}
<a href="{{ patent.url | append: '/' | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
<a href="{{ patent.url | replace: '//', '/' | prepend: site.baseurl | prepend: site.url }}">
Continue reading »
</a>
</article>
Expand Down

0 comments on commit d818ca8

Please sign in to comment.