0

I am currently creating a distill website through R (hopefully to transition to Quarto, but still using distill). Currently, the R code is connected with GitHub to publish the website, and this will mainly be for internal use within my department. There is concern with the public availability if the website's link gets out.

I was wondering if there was a way to build into the R code a way to assign usernames and passwords for our personnel, which will force a login portal when someone accesses the link.

I am fairly new to allow of this website development through R, so an example would be very helpful! Thanks!

1 Answers1

1

To manage credentials, you need server-side code. GitHub Pages is static, so there's no server for you to run it on.

You have a couple of options:

  1. Host the site on a server and manage access using something like a htaccess file
  2. Change the GitHub page to be private. Note that you'd then need to give anyone who needs access read access to the repo, which would mean that they would need to have a GitHub login.
Taren Sanders
  • 421
  • 2
  • 12
  • I have found ways to password protect a RMD file. Is there no way to use that on the index RMD file used for the website's homepage that essentially password protects the entire site, since you can't access the site until you enter the password for the initial page? This is the code I found: --- output: html_document params: pwd: label: "Enter the Password, please!" value: "" input: password --- but it just password protects the knitting of the output file. – braunrs Jul 19 '23 at 18:41