3 ms·
No, you'd probably need some Javascript. But why not this: publish the blog post the normal way and configure the web server to only serve it to people with a
by Tomte 7y ago
No, you'd probably need some Javascript.
But why not this: publish the blog post the normal way and configure the web server to only serve it to people with a proper username/password (HTTP Basic Authentication).
All browsers and web servers let you do that.
For Apache, see this example: https://httpd.apache.org/docs/current/howto/htaccess.html#auth https://httpd.apache.org/docs/current/howto/htaccess.html#au...
- dhruvkar 7y agowant it for a static site, no access to the backend. I dont want to run a full blown website, just want access control. possible?
- Tomte 7y agoSure, if your web hoster allows .htaccess files (most do). You just put that file next to your HTML files.
- dhruvkar 7y agoHave you ever hosted something github pages or netlify? Those are the situations I'm talking about, where an htaccess or any server side access control wouldn't work.
- Tomte 7y agoNo, I haven't. But since you did not tell anyone about that requirement, how was I to guess it?
- dhruvkar 7y agoYou're right. I assumed mentioning static site with Hugo or Jekyll was enough. To clarify, it would be a static site with hosting on something like netlify or github or gitlab pages, where you don't have access to the server.