Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(meta): add lightning address as metadata #279

Merged
merged 1 commit into from
Feb 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
<meta property="og:description" content="{% if page.description %}{{ page.description | escape }}{% else %}{{ site.description }}{% endif %}">
<meta property="og:image" content="{% if page.image %}{{ page.image | absolute_url }}{% else %}{{ site.default_img | absolute_url }}{% endif %}">

<!-- Lightning Address for Alby's Value4Value extensions -->
{% capture shortName %}{{ page.redirect_from | replace: '/', '' }}{% endcapture %}
{% capture lightningAddress %}{% if shortName %}{{ shortName }}{% else %}{{ 's@ts.dergigi.com' }}{% endif %}{% endcapture %}
<meta name="lightning" content="lnurlp:{{ lightningAddress }}"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to send some sats and test it, but it seems your lightningAddress is empty here. jfyi. :)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ich habe keine Ahnung von liquid templates, aber muss das sowas sein?

{% capture lightningAddress %}{% if shortName != '' %}{{ shortName | append: "@ts.dergigi.com" }}{% else %}{{ 's@ts.dergigi.com' }}{% endif %}{% endcapture %}

also wenn der shortName nicht ein empty string ist (der shortName wird auf '' gesetzt und ist deshalb bisher truthy) dann soll die addresse {shortName}@ts.dergigi.com sein, ansonsten s@ts.dergigi.com

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vielleicht auch:

{% capture lightningAddress %}{% if shortName == blank %}{{ 's@ts.dergigi.com' }}{% else %}{{ shortName | append: "@ts.dergigi.com" }}{% endif %}{% endcapture %}

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Should be fixed with #288 - might take a minute or two until it is live. Tested it on local, and it truly should be fixed now.


<!-- Twitter cards -->
<meta name="twitter:site" content="@{{ site.title }}">
Expand Down