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: add streams button #605

Merged
merged 1 commit into from
Oct 25, 2023
Merged

Conversation

LeviSnoot
Copy link
Contributor

I'm not sure where I messed up but it won't add rel=me to any links using this setup, including Mastodon and Firefish, so I need help solving that before we can merge.

@LeviSnoot
Copy link
Contributor Author

Once correctly implemented, this should fix #600

@@ -7,7 +7,7 @@

{{-- Fediverse rel="me" links --}}
@php
$relMe = "mastodon, firefish";
$relMe = "mastodon, firefish, streams";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Issue is definitely related to this and possibly the next line. I'm just not sure what the problem is.

@JulianPrieber
Copy link
Member

This adds the rel me thing to the HTML head

@JulianPrieber
Copy link
Member

Is this it?
https://codeberg.org/streams/streams

@LeviSnoot
Copy link
Contributor Author

This adds the rel me thing to the HTML head

I'm not sure how it manages to work in the current version then since there's no other reference to either mastodon or firefish in that file.

Is this it? https://codeberg.org/streams/streams

Yup, that's the one.

@JulianPrieber
Copy link
Member

If you add a button name to the array this loop is gonna look through every link that would be displayed on the page:

@foreach($links as $link)
  @if(in_array($link->name, $relMeList))
    <link href="{{$link->link}}" rel="me">
  @endif
@endforeach

If a link matches one in the list, this is added inside the head tag of the page:
<link href="[the link]" rel="me">

This will not be added to the links to the sites just a separate independent tag inside the head that can only be seen in the rendered HTML.

This will then look something like this:
BVmXiBJ8uL

Something like Mastodon picks up on this and confirms the page as verified.

Doing it this way is easier than have a separate check in every button that needs this.

@JulianPrieber JulianPrieber linked an issue Oct 23, 2023 that may be closed by this pull request
@LeviSnoot
Copy link
Contributor Author

Oh okay that makes perfect sense, I'll check if the current draft functions as intended in a bit and change the status of the PR if it does.

@LeviSnoot LeviSnoot marked this pull request as ready for review October 25, 2023 08:01
@LeviSnoot
Copy link
Contributor Author

image

Checked now and yeah it's all there 💯

@JulianPrieber JulianPrieber added the enhancement New feature or request label Oct 25, 2023
@JulianPrieber JulianPrieber merged commit 6531dde into LinkStackOrg:main Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rel="me" only in Mastodon links
2 participants