0

I built a blog with Jekyll , I write technical posts and something about my daily life. I want to make my technical posts available to anybody but posts about myself only available to my friends for privacy. How can I achieve this?

Cauchy Schwarz
  • 747
  • 3
  • 10
  • 27
  • You may find useful the answer about oauth2_proxy at this thread: https://stackoverflow.com/questions/50809299/what-is-the-simplest-way-to-restrict-access-to-a-static-website-using-social-aut – Chocksmith Nov 20 '20 at 12:11

1 Answers1

0

With Jekyll itself, you can’t (barring some arcane JavaScript client-side encryption). You can use your webserver’s access control settings, though. If you use Apache, you can use the .htaccess file to protect a certain folder with a password. And then you would need to set up Jekyll to output the protected posts into this folder only.

zoul
  • 102,279
  • 44
  • 260
  • 354
  • I checked the link [protect a certain folder with a password](https://davidwalsh.name/password-protect-directory-using-htaccess) , in fact the Apache server provides access control functionality right? The `.htaccess` file is part of that? I would go to read the Apache docs carefully... – Cauchy Schwarz Apr 11 '16 at 05:35
  • Yes, the `.htaccess` file is an Apache configuration file, you can read about it [in the Apache docs](https://httpd.apache.org/docs/current/howto/htaccess.html). – zoul Apr 11 '16 at 06:29