okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
250 stars 134 forks source link

WIP: Add support for memberspace #712

Closed mpourismaiel closed 4 years ago

mpourismaiel commented 4 years ago

What this PR does / why we need it: Add support for memberspace

Which issue this PR fixes: fixes #631

Special notes for your reviewer: The implementation works with a fragment that you can add to _global or any page or section globals and in turn nav fragment in those pages will display a login link. I didn't add anymore customizations since I'm not even sure if this is the best approach. My assumptions is that the user would create a memberspace.md file in _global with following content:

+++
fragment = "memberspace"
subdomain = "subdomain_copied_from_installation_guide_of_memberspace"
+++

And then the nav fragment will display a link to Login/Signup page in Memberspace. It would be recommended that the button Memberspace provides be disabled from their website. But we can also move the "go to top" button as we discussed.

If you have any other approach in mind please let me know and if everything is okay I can add documentation and we can move forward with the merge.

Release note:

- memberspace: New fragment that adds memberspace scripts to enable the service for Syna
ghost commented 4 years ago

Congratulations :beers:. DeepCode analyzed your code in 0.106 seconds and we found no issues. Enjoy a moment of no bugs :sunny:.

:speech_balloon: This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues.


:relaxed: If you want to provide feedback on our bot, here is how to contact us.

mpourismaiel commented 4 years ago

Currently I can't think of any approach that would be less complex. I would love to hear ideas on the matter. Maybe remove the fragment and make it a site configuration, applied to the baseof template?

JOduMonT commented 4 years ago

I'm curious, it is like a paywall ? What manage the authentication Discourse, Netlify ?

stp-ip commented 4 years ago

Memberspace is a paywall service especially for membership use cases. They have different modes of security. Simplest will remove content until payment via JS, one will add the content in via JS from their DB after payment/login.

Authentication is therefore done on the memberspace side of things.

Link to service: https://memberspace.com

JOduMonT commented 4 years ago

I didnt knew it was a SaaS I wonder if these bypass works ?

stp-ip commented 4 years ago

Most likely depends on the mode used. But that's not part of Syna so not really relevant here.

stp-ip commented 4 years ago

Let's shelf this for now. We first need a better idea around provider fragments and also can't add things globally for a fragment.

Possible option for injecting something like this is the fragments JS or our event framework. Let's discuss this separately.