Skip to content

A small Flask application that provides a means for a team of bloggers to create and manage a public blog

Notifications You must be signed in to change notification settings

berubejd/TeamBlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Team Blog

Team Blog is a small Flask application that provides a means for a team of bloggers to create and manage a public blog.

Features

Custom passwordless authentication

While most Flask applications use an authenticaton system based on flask-login, I wanted to implement a passwordless system. Rather than require a local password to be stored or to depend on a third-party OAuth system, access is provided via encrypted tokens delivered by email. Email delivery, in this implementation, is now being provided by Resend's API.

Markdown generated HTML blog pages

The blog pages themselves are generated from markdown stored on the filesystem using flask-flatpages. This markdown, and the associated metadata required to properly manage those pages, is created via the custom Admin page located at '/admin'. (Since accounts are "closed" to only invited team members, the admin page is not linked from the main website.)

The admin page uses a JavaScript library called SimpleMDE (provided by flask-simplemde) to provide an incredible editor that allows the final page to be previewed before being published.

Image file management

Finally, the image management page leverages a small amount of custom JavaScript written using jQuery and flask-reupload (an up to date version of flask-uploads). Although the original project does appear to still be active, the maintainer has decided to no longer publish up to date project files to Pypi. The flask-reupload project has expanded upon the original work, while maintaining backwards compatibility, and provides the updated extension via Python package to make it easy to incorporate into your project.

Screenshots

Landing Page

Landing

Admin Page

Admin

Blog Cards

Cards

Image Management

Management

Other Resources

Although a number of tools have already been mentioned, there were also a few tutorials that were helpful in completing this project. Those tutorials were:

The entire website has been implemented using Flask, Flask-WTF, and Bootstrap 4, but was designed based on a template created for Jamstack with Stackbit:

Future Improvements

  • The app is complicated enough and already organized around three "functions" (blog, admin, image management). Migrating those pieces into blueprints would make future application development easier to manage.
  • This Flask app was designed using the "traditional" app.py pattern but would potentially benefit from being implemented using the "factory pattern".
  • Having implemented passwordless authentication, creating an extension from it would improve its use in future projects.
  • It is currently possible to view blog entries by date and by tag but not by author.

About

A small Flask application that provides a means for a team of bloggers to create and manage a public blog

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published