Skip to content

Commit

Permalink
fix(amsf): no page/post title fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Nov 12, 2018
1 parent f3c3a4c commit 176d3a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
21 changes: 5 additions & 16 deletions _app/_includes/amsf/title
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,13 @@
Page title
{%- endcomment -%}
{%- capture amsf_page_title -%}
{%- if page.title -%}
{%- if page.title.first -%}
{{ page.title[site.active_lang] }}
{%- if type.title -%}
{%- if type.title.first -%}
{{ type.title[site.active_lang] }}
{%- else -%}
{{ page.title }}
{{ type.title }}
{%- endif -%}
{%- else -%}
{{ site.name }}
{%- endif -%}
{%- endcapture -%}

{%- comment -%}
Post title
{%- endcomment -%}
{%- capture amsf_post_title -%}
{%- if post.title.first -%}
{{ post.title[site.active_lang] }}
{%- else -%}
{{ post.title }}
{{ amsf_site_name }}
{%- endif -%}
{%- endcapture -%}
2 changes: 1 addition & 1 deletion _app/_includes/themes/curtana/includes/page-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<section class="list">
<h1>
<!-- Item title -->
<a href="{{ post.url | relative_url }}" {% if site.data.curtana.colorful_list %}{{ post_link_color }}{% endif %}>{{ amsf_post_title }}</a>
<a href="{{ post.url | relative_url }}" {% if site.data.curtana.colorful_list %}{{ post_link_color }}{% endif %}>{{ amsf_page_title }}</a>

<!-- External link indicator -->
{% if post.link %}
Expand Down

0 comments on commit 176d3a0

Please sign in to comment.