Building a Blog: Authentation
This post is part 3 of the "Building a Blog" series:
- Building a Blog: Overview
- Building a Blog: Generating Static Files
- Building a Blog: Authentation
- Building a Blog: Deploy
There's a pelican-encrypt-content plugin for encrypting single post, but static pages does not support sessions. Whenever I tried to open a encrypted page, I need to enter a password, that can be annoying.
I have to add a dynamic layer ontop of these static pages. This task itself is infact simple, but it will make the deploy step much more complicated. For deployment I'll talk about in the next post.
As described earlier, I've collected all confidential urls already, and the urls is just the path of the corresponding htmls saved on the dist. So all I need to do is parse the requested url, figure out the access status, and send a response. I also need to provide an additional route for logging in. Using flask it's just a few tens lines of code.