-
-
Notifications
You must be signed in to change notification settings - Fork 33
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 doFollow parameter for contributor links #616
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ansh Goyal <[email protected]>
@anshgoyalevil Pretty good stuff from what I can tell! Seems from tests that it fails at linting. |
Lint check is passing locally. Here in this PR, GHA won't trigger unless one of the maintainers runs it. Would have to look around that dashboard table thing. I am not able to view that page on OpenCollective.com as it is only for admins. I might have to clone the OpenCollective frontend locally to view that |
Is this the place you are talking about, @DreadKnight? As I can see, the parameters you are talking about won't be added to this page as they are exclusively for json API. After this PR gets merged, that's how you can ask for a doFollow banner: Notice a |
@anshgoyalevil Figured the parameter stuff 👍🏻 I'm talking about this table though (parameters for the widget): |
Yeah, makes sense; can supposedly save some server resources 🐻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add screenshots of the results after fixing the issue?
@@ -124,7 +124,9 @@ export function generateSvgBanner(usersList, options) { | |||
const imageLink = `<a xlink:href="${website.replace( | |||
/&/g, | |||
'&', | |||
)}" class="opencollective-svg" target="_blank" rel="nofollow sponsored" id="${user.slug}">${image}</a>`; | |||
)}" class="opencollective-svg" target="_blank" rel=${doFollow ? 'sponsored' : 'nofollow sponsored'} id="${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing quotes.
)}" class="opencollective-svg" target="_blank" rel=${doFollow ? 'sponsored' : 'nofollow sponsored'} id="${ | |
)}" class="opencollective-svg" target="_blank" rel="${doFollow ? 'sponsored' : 'nofollow sponsored'}" id="${ |
=>
Please make sure to test your changes, the instructions to start the project are in the README.
This PR adds a new
doFollow
parameter that allows collectives to opt-in to"dofollow" links in their contributor widgets. When enabled, the "nofollow"
attribute is removed from contributor links while maintaining the "sponsored"
attribute for proper link attribution.
Changes:
The default behavior (nofollow links) remains unchanged unless explicitly
opted into using the doFollow parameter.
Fixes opencollective/opencollective#5968