How to implement basic authentication on github pages created by slate - authentication

I created a documentation site by using slate, then deployed it on Github pages. However it became public because Github pages are public. I am wondering if there is a way to add a basic authentication on this github page? So only the team can see the documentation.
Any suggestions/hints would be appreciated!

No, there isn't. Github pages provide basic static hosting. That is all. There are no (server side) dynamic options at all.

Related

Add blog posts in a Nuxt content blog

I want to create a blog using nuxt since I am familiar with vue js. I have looked at nuxt content module. I understand that i can create markdown blog posts. But, I am confused. If I deploy the app, then How can I add new blog posts?
Thank you.
You add the posts before deploying, in your source code, as described in Nuxt Content's documentation. Then you have to build the Nuxt project and (re)deploy the site.
If you need the ability to edit your blog after deployment, in your browser, and redeploy it after every editing automatically, you would need a service which has access to the source code and has ability to build & deploy your site. Netlify CMS can be one such solution, (especially) if your site's source code is on GitHub. (It works with private repositories too.)

User registration in gatsby js

is their a way to let a website developed using Gatsby js, have user registration, user can have a profile and edit it, and user can add new article or item to the website ?
I know gatsby is static site generator. but I'm wondering if I can use Gatsby as a solution for such web application, and if not what are the tools I need to include to make it work ?
thanks.
Not sure why you are getting downvoted.
Apart from the comment by #fabian-schultz, the keyword is you are looking for I believe is CMS.
Basically you just want some dynamic content in your website which is generated by a static site generator.
There are a lot of choices. For example, you can follow the official tutorial to use Netlify CMS with Gatsby.
Hope it's enough to get you started.

How does the Plunker authentication work

All. Forgive me if my question is off topic or a dumb question.
I really want to know how to implement a authentication mechanist like GitHub for Plunker.
In my project.I think I have the same situation like this.
I have some websites like Plunker.
and I want to implement a SSO center authication website or services for all the other websites like GitHub.
when I click the button Sign in with GitHub in the Plunker. The website will open the new windows with the url
https://github.com/login?return_to=%2Flogin%2Foauth%2Fauthorize%3Fclient_id%3D7e377e5657c4d5c332db%26redirect_uri%3Dhttp%253A%252F%252Fplnkr.co%252Fauth%252Fgithub%26scope%3Dgist
When I succeed to login in GitHub. Then the Plunker will login with the authenticated user I just used in the GitHub.
My problem is I don't know how does the authentication works between the GitHub and Plunker.
Could someone please tell me something about it ? It will be appriciated. Thanks.
Plunker's "log in with GitHub" button uses OAuth2, an open standard for this kind of thing. It's the same technology used by Google for their sign-in with Google functionality, as well as many other providers.
Here is GitHub's documentation for adding "log in with OAuth" to your site.
Creating your own OAuth provider is a significant task, and one that you probably don't want to tackle without weighing carefully. If you do choose to go down this path you'll likely want to use an existing library for your language or stack of choice, e.g. perhaps something from this list. This is also good advice if you only plan to build an OAuth client.
As pointed out, Plunkr's login process appears to be using Github's OAuth2, but manages to pull it off on the client without redirects/reloads using window.open and postMessage. A detailed description of the technique can be found here. The demo code looks relatively painless.
The Gatekeeper project seems to be a more polished implementation (with node.js) of that idea and there is a detailed tutorial on doing client-side auth with it here.

Authenticator for static website

Is there any ready to go solution for hosting static website (Jekyll) with authentication against some service (like Dropbox, Git or Google-Drive)?
The idea behind that is to use Jekyll for writing technical notes for the private corporate blog.
Any suggestions are welcome. Cheers
I looked around and Jekyll Auth seems to fit your needs. I do not experience with Jekyll but it seems pretty straight forward. Works with GitHub I believe.
https://www.ruby-toolbox.com/projects/jekyll-auth/popularity
One option is to use HTTP basic auth. The disadvantage of such an approach is that all users would have the same username and password. This blog post explains how to add basic auth to a Jekyll site:
https://www.aerobatic.com/blog/password-protect-a-jekyll-site
Disclaimer: I'm a co-founder of Aerobatic

Integrating Gumroad API into Github Pages

So Gumroad has a really cool API and Github has some cool Pages functionality. Has anyone tried to integrate Gumroad's API with Github Pages as a store front to sell software?
Would it be worth attempting? From my quick reading on the Github Pages it looks like the page source is published in your repo. So maybe it wouldn't work too well if you had your Gumroad API key tied into it?
Just a thought that hit me while working on something today and wanted to see if anyone has successfully accomplished this with Gumroad + Github.
It would be completely reasonable to combine Gumroad and Github Pages to create a website where you can sell software.
The easiest way, however, would probably be to just add in the embed code for your products into the Github Pages website, which would work perfectly. I'm not sure if you can use Node.js in Github Pages, but if possible, you can use the higher level API's as well.
P.S. You should try to create this. I'm planning to do something similar with artwork!