First Post
This is the first post demonstrating the capabilities of our static site generator. It showcases various markdown features and the site’s reflection capabilities.
I started this blog back in August of 2011 with no expectations about what it would become or how much viewership it would get. Back then, I was a PhD student, and I wanted to be able to write some kind of journal or log with various thoughts about the research work I was doing. I find that by writing my thoughts down, sometimes it helps me articulate them and figure out certain things. It can even be therapeutic. Over the years, I went on to publish 159 posts on this blog about a wide variety of subjects. Looking back, not everything I wrote is of the same quality level, but I’ve made the Hacker News front page more times than I can count. This blog has been an invaluable tool in connecting with like-minded people. It got me valuable feedback, speaking gigs, jobs, and even helped me make new friends.
Markdown Features
The generator supports all standard markdown features:
- Bold text and italic text
- Links with smart URL handling
- Images and other media
- Tables, footnotes, and more
Lists
- Ordered lists
- With multiple items
- And nested items
- That can be unordered
Blockquotes
"The best way to predict the future is to invent it." — Alan Kay
Code Highlighting
The syntax highlighter supports many languages:
from pathlib import Path
class Site:
def __init__(self, content_dir):
self.pages = []
self.load_pages(content_dir)
def load_pages(self, directory):
for md_file in Path(directory).rglob('*.md'):
self.pages.append(Page(md_file))
# Build the site
python ssg.py build
# Watch for changes
python ssg.py watch
Smart Typography
The generator automatically converts quotes and dashes:
- "Smart quotes" are applied automatically
- Em-dashes — like this — are converted
- Ellipses… become proper ellipsis characters
Site Context
Since every page has access to the full site context, we can do things like:
- List all pages with a specific tag
- Create automatic navigation between posts
- Generate category and tag indexes
- Build sitemaps and RSS feeds
This post has 6 sibling pages in the site!