Private Eleventy blog #2231
Replies: 3 comments 2 replies
-
Possibly https://docs.netlify.com/visitor-access/password-protection/ |
Beta Was this translation helpful? Give feedback.
-
You could try using netlify functions for this purpose, they can act as an API, even if user/password is hardcoded. |
Beta Was this translation helpful? Give feedback.
-
I built something myself because i was pretty disappointed at most of the solutions others proposed. Certainly not super scalable but works perfectly for me (see http://lucasgelfond.online), happy to try to help others setup and maybe could build a less jank version (that uses templates) and publish. All of this just goes within first, I apply a trasnform on the encrypted pages
then, i have a secret key that i keep in the env / use for encryption
for all of those pages that I want to make private, i manually write the HTML (LOL), which basically has all of the info on it to open the page
the authenticate function first:
I also have something to check localstorage on load, and this only occurs if it is a secret slug - otehrwise we let eleventy return the normal page content
|
Beta Was this translation helpful? Give feedback.
-
I can successfully publish my blogs on netlify or github pages, but is there a way to add simple and secure authentication system to access the blog?
Beta Was this translation helpful? Give feedback.
All reactions