A GitHub Pages template for creating your own Today I Learned (TIL) website. Document and share your daily learnings in an organized and searchable way. This project is inspired by https://til.simonwillison.net/ and some others that I found.
- 📝 Write TILs in Markdown
- 🔍 Full-text search functionality
- 🏷️ Tag support with dedicated tag pages
- 📱 Responsive design
- 🚀 Fast and lightweight
- 🐳 Docker support for easy development
- 🔄 Automated GitHub Pages deployment with CI/CD
- ⚡ Optimized build performance with caching
- 🛡️ Secure deployment with GitHub Actions
-
Click "Use this template" to create your own repository
-
Update
_config.yml
with your site information:- Change
title
,html_title
,site_name
, anddescription
- Update
baseurl
to match your repository name - Update
url
if using a custom domain
- Change
-
Add your TILs in the
_til
directory following the format:--- layout: post title: "Your TIL Title" date: YYYY-MM-DD tags: [tag1, tag2] --- Your content here in Markdown
-
Enable GitHub Pages in your repository settings:
- Go to Settings > Pages
- Set source to
main
branch - Save changes
-
Update
_config.yml
with your preferences:title: "Today I Learned" html_title: "TIL - Your Daily Learning Notes" site_name: "Today I Learned" description: "A collection of things I learn day to day" baseurl: "" # If using GitHub Pages with custom domain url: "" # Your site URL
-
Customize the appearance:
- Modify
assets/css/syntax.css
for code highlighting - Edit
_layouts/post.html
for post layout - Update
index.html
for the main page layout
- Modify
-
Optional configurations:
- Add Google Analytics by updating the tracking ID in
_config.yml
- Customize the search functionality in
search.html
- Modify tag display in
tags.html
- Add Google Analytics by updating the tracking ID in
-
Create a new file in the
_til
directory with the format:YYYY-MM-DD-title-slug.md
-
Add the front matter:
--- layout: post title: "Your TIL Title" date: YYYY-MM-DD category: Category tags: [tag1, tag2] ---
-
Write your content in Markdown below the front matter
-
From your project root, run:
# Replace the title with your post title (use quotes for multiple words) DATE=$(date +%Y-%m-%d) TITLE="your-title" && touch "_til/$DATE-$TITLE.md"
-
This is an example template for your new post:
--- layout: post title: "Your Title Here" date: YYYY-MM-DD category: Category tags: [tag1, tag2] --- ## What I Learned Brief description of what you learned. ## Why It's Useful Explain why this knowledge is valuable. ## References Any references for your TILs
When creating a new TIL post, you'll need to specify both a category and tags. Here's how to use them:
- Use one category per post
- Categories represent the main technology or domain of your learning
- Should be a single word or simple term
- Examples:
Jekyll
,Docker
,Git
,Python
,AWS
- Can use multiple tags per post
- Tags are more specific descriptors or sub-topics
- Help in detailed classification and searching
- Examples:
deployment
,caching
,optimization
,security
Example frontmatter:
---
layout: post
title: "Docker Layer Caching Tips"
date: 2025-01-08
category: Docker
tags: [containers, optimization, caching, deployment]
---
- Keep titles clear and concise
- Use relevant tags for better organization
- Include code examples when applicable
- Add references to source materials
- Use headers to organize content
- Include practical examples or use cases
-
Clone your repository:
git clone <your-repository-url> cd <repository-name>
-
Start the development server:
docker-compose up
-
Visit
http://localhost:4000
in your browser
The site will automatically rebuild when you make changes to any source files.
-
Stop the server:
docker-compose down
-
Rebuild the container (after Gemfile changes):
docker-compose up --build
-
View logs:
docker-compose logs
This project is open source and available under the MIT License.