My primary goal was to launch a publishing platform as quickly as possible. To achieve this, I opted to use my primary language, Python, and focused on rapid development tools and frameworks instead of more bespoke solutions.
Within the Python ecosystem, Django stands out as the best choice for rapidly building a fully functional website. While server-side template rendering may feel a bit dated, it remains a robust solution for straightforward sites with a limited number of pages. Additionally, Django's built-in admin interface significantly reduces the need to write custom CRUD views.
A core requirement for this site was the ability to easily add new posts with rich text. This necessitated a rich text editor, and the django-tinymce
package is the de facto choice. Installing the package and creating a custom admin interface to use the TinyMCE widget are well-documented and straightforward.
CSS and layout design are time-intensive tasks for me, so I sidestepped the complexity by utilizing a template from Start Bootstrap. While I could have chosen a more modern approach, I deliberately avoided deploying custom JavaScript to keep the initial deployment as simple as possible.
I also added an email contact form powered by SendGrid’s service. This allows users to reach out to me without exposing my email address to spambots. To further mitigate spam, I incorporated Google’s reCAPTCHA into the form.
Heroku offers a straightforward solution for code deployments. A simple push to the main branch of the GitHub repository triggers a complete deployment.
However, Heroku does have limitations. Its ephemeral storage means file system changes do not persist after new deployments. Additionally, it does not provide native support for serving Django's static files.
Initially, I used the whitenoise
package recommended by Heroku, which works well for serving static files. However, I also wanted to add dynamic media to the site, so I switched to using AWS S3 for storage and a CloudFront CDN. This setup allows me to manage both static files and new dynamic assets effectively.
The code for this site is available on GitHub at github.com/elmq0022/blog. It han an MIT, so feel free to use and adapt it as you see fit.