Skip to content

Commit

Permalink
correctly link to bookmark URL for indieweb style bookmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
lchski committed Nov 19, 2022
1 parent f07b758 commit 5508869
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion _layouts/study--link.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
{% if page.link_title %}
{% assign link_title = page.link_title %}
{% endif %}
<h1 class="f2 mb0 measure"><a class="dim light-purple" href="{{ page.link }}">{{ link_title | markdownify | remove: '<p>' | remove: '</p>' }}</a></h1>

{% assign link_url = page.link %}
{% if page.bookmark-of %}
{% assign link_url = page.bookmark-of %}
{% endif %}
<h1 class="f2 mb0 measure"><a class="dim light-purple" href="{{ link_url }}">{{ link_title | markdownify | remove: '<p>' | remove: '</p>' }}</a></h1>
</header>

<div class="f3 measure lh-copy serif nested-list-item-spacing">
Expand Down
7 changes: 6 additions & 1 deletion links/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ <h1 class="page__intro">Links</h1>
{% elsif link.link_title %}
{% assign link_title = link.link_title %}
{% endif %}
<h2><a href="{{ link.link }}">{{ link_title }}</a></h2>

{% assign link_url = link.link %}
{% if link.bookmark-of %}
{% assign link_url = link.bookmark-of %}
{% endif %}
<h2><a href="{{ link_url }}">{{ link_title }}</a></h2>
{{ link.content | markdownify }}
<p class="meta">
<a href="{{ link.url }}">{{ link.date | date: "%l:%S %P on %B %e, %Y" }}</a>
Expand Down

0 comments on commit 5508869

Please sign in to comment.