Skip to content

Commit

Permalink
Merge pull request #600 from jamezp/issue599
Browse files Browse the repository at this point in the history
[599] Add the link for permalink posts which have a redirect. Also ad…
  • Loading branch information
bstansberry committed Apr 30, 2024
2 parents 12bf842 + 52c8d64 commit 33333c6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _layouts/base.html
Expand Up @@ -27,6 +27,10 @@
<script src="{{ site.baseurl }}assets/javascript/tracking.js"></script>
<script src="https://design.jboss.org/matomo/matomo.js" async defer></script>

{% if page.link %}
<meta http-equiv="refresh" content="0; {{ page.link }}">
{% endif %}

</head>

<body class="{% if page.url == '/' %}homepage{% else %}{{page.title}}{% endif %}">
Expand Down
10 changes: 10 additions & 0 deletions _layouts/post.html
Expand Up @@ -39,7 +39,17 @@ <h1 class="title">{{page.title}}</h1>
</p>
</div>
<div class="grid__item width-10-12 doc-content">
{% if page.link %}
{% if content == empty and page.synopsis != empty %}
{% assign content = page.synopsis %}
{% endif %}
{{ content }}
<p>
Redirecting to <a href="{{ page.link }}">{{ page.link }}</a>
</p>
{% else %}
{{ content }}
{% endif %}
</div>
</div>

Expand Down
2 changes: 2 additions & 0 deletions feed.xml
Expand Up @@ -78,6 +78,8 @@ layout: null

{% if post.excerpt and post.excerpt != empty %}
<summary type="html">{{ post.excerpt | strip_html | normalize_whitespace | xml_escape }}</summary>
{% elsif post.synopsis %}
<summary type="html">{{ post.synopsis | strip_html | normalize_whitespace | xml_escape }}</summary>
{% endif %}

{% assign post_image = post.image.path | default: post.image %}
Expand Down

0 comments on commit 33333c6

Please sign in to comment.