Skip to content

Bubu-Droid/website

Repository files navigation

A personal website built with Django.

Features

  • Markdown-rendered blog posts
  • Searchable blog and archive with keyword- and tag-based filtering
  • Math rendering with LaTeX
  • Clean, responsive layout (Tokyo Night-inspired)
  • Static pages (About, Olympiads, Pet Peeves, etc.)
  • Sitemap + robots.txt for SEO
  • Error logging with email alerts

Setup

git clone https://github.com/Bubu-Droid/website.git
cd website
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
touch .env

Set up the .env file using with the following template:

SECRET_KEY = "<your-secret-key>"
DEBUG = TRUE
EMAIL_HOST_USER = "<sender-email>"
EMAIL_HOST_PASSWORD = "<sender-email-app-password>"
DJANGO_SETTINGS_MODULE = website.settings
ENCRYPTION_KEY = "<encryption-key>"
CRON_SECRET = "<cron-secret>"
  • To generate a new secret key, you may use this website.

  • To generate an app password for your <sender-email> account, follow this video and then use the generated password as your <sender-email-app-password>.

  • To generate an encryption key, install cryptogrpahy module using pip install cryptography and run the following python commands:

    from cryptography.fernet import Fernet
    
    print(Fernet.generate_key())
  • To generate a cron secret key, use this website to generate a password of at least 16 characters.

  • To turn off debug mode, set the DEBUG parameter to FALSE.

  • Also, make sure settings.py contains:

    ADMINS = [("<your-name>", "<receiver-email>")]

Then run the deployment server:

python3 manage.py runserver