Assuming you have a model called Post defined in your models.py file that contains blog posts, and has a date_published field.
Step 1: Write the context processor
Create (or add to) a file in your app directory called context_processors.py:
from myapp.models import Post
def recent_blog_posts...