Hugolify / hugolify-decap-cms

Decap CMS for Hugolify
MIT License
0 stars 1 forks source link

Support for Cloudflare Pages #4

Open Mecanik opened 8 months ago

Mecanik commented 8 months ago

Hello,

I cannot stress enough how amazing all your work on this is. Unfortunately, this is limited only to Netlify and this is quite a letdown.

After doing some calculations I personally would not host even the simplest site on Netlify, it's just not feasible. I won't even mention hosting a larger scale project. With that being said, could you make a copy of this and try to upload it on Cloudflare Pages?

Essentially you just need to remove Netlify widget for Identity and let people secure their /admin/ area as they wish. I can even help you do that with user system if necessary, it's not a big deal. I have quite some experience with their stack and it's easily achievable to secure the CMS.

From my personal opinion, you should focus on Cloudflare Pages because users there are absolutely hungry to have a CMS like this one and unfortunately there is none at the moment.

Kind Regards, Norbert

arthaud-proust commented 8 months ago

Hello Norbert,

Thanks for your issue.

I could understand your wish to host Hugolify on another host that Netlify. But I need to understand why it's not feasible on Netlify for you ? Because of pricing, performances, or functionalities ? You did calculations about what ?

Because Hugolify use some Netlify features, using Hugolify on Cloudflare Pages may need more work than using their auth system. For example, the form bloc use Netlify forms to keep Hugolify serverless. Also, Hugolify uses Netlify Identity so that clients don't need to create a github account to access admin. All the user registration part is handled by Netlify. I don't know if an alternative exists on CloudFlare.

Thanks, Arthaud

Mecanik commented 8 months ago

Unfortunately I cannot comment too much on Netlify (due to obvious reasons), however in comparison with Cloudflare Pages the difference is clear.

Because of pricing, performances, or functionalities ?

That is correct, all these reasons and more.

You did calculations about what ?

For example, I calculated what would be cost for a medium sized public project where people can register. This combined with Bandwidth charge, Identity charge, Email changing charge and so on makes it unattractive for me.

Because Hugolify use some Netlify features, using Hugolify on Cloudflare Pages may need more work than using their auth system. For example, the form bloc use Netlify forms to keep Hugolify serverless.

Easy fix... https://developers.cloudflare.com/pages/platform/functions/plugins/static-forms/

Also, Hugolify uses Netlify Identity so that clients don't need to create a github account to access admin. All the user registration part is handled by Netlify. I don't know if an alternative exists on CloudFlare.

There is none yet, but you can roll your own. Users can create their own system and it costs a fraction of what Netlify Identity would charge you. For example: https://mecanik.dev/en/posts/cloudflare-pages-register-login-and-user-system/

But this is out of the scope; you only need to support Cloudflare Pages and let the users take care of the rest. For example, another easy solution is to use https://developers.cloudflare.com/cloudflare-one/ and anyone non-technical can lockdown /admin/ to specific users (where a user is around just 7$/month!).

Please understand that Cloudflare has all the features necessary, it's just not that friendly as Netlify currently is; but I am sure it will become so.

As I mentioned, all you have to do is make a copy and remove Netlify dependency... the rest is easy.