I have my semester notes published as a website, notes.sahithyan.dev. It includes notes for all my semesters (1 to 5). I am using the site as my single source of truth for my studies. And I am still maintaining it.
Each semester used to live on its own subdomain (s1, s2, s3). I merged them into one site with a path per semester, the old subdomains now redirect to the new paths. Old URLs are still useful because of these redirects.
# Why?
On the 1st day of my semester 1, I wrote the notes using pen-and-paper. My handwriting is very illegible. I moved to text files, and then to markdown. My plan was to have a directory of my notes which would be grouped by modules and subsections.
I thought it would be easy and more portable if I published them as a small website. And here we are.
# Tech stack
I am using a Astro for the website. I initially used the Starlight theme, but I later moved off it to a custom Astro build due to my requirements.
To write the content, I use markdown. I am using katex to render the mathematical expressions. I have setup MDX to render custom components in the notes.
# Additional things
# Live user count
The website has a small counter in the header. It shows how many users are currently browsing the website.
I built the live counter and hosted on a VPS just for this website. It was fun. I wrote how I built the live user count as a separate post.
Now whenever I visit the sites now, I see how many people are actively using it. That’s a great motivatation to keep improving the notes.
# Notes as pdf
I received many requests to provide the notes as PDF files. Initially I wrote a script to generate PDFs for each section. Later, I modified the script to generate a single e-book styled PDF for the entire semester. The script uses puppeteer to export the webpages as PDFs.
After the semester is over, I tried converting the entire website into a single e-book styled PDF. That was also a fun project. But it took me a long time to come to a satisfactory result. I also integrated pdf-lib to add metadata and outlines.
I wrapped the script as an Astro integration to generate the PDF on each production build.
I have since discontinued the PDF exports. I started adding interactive components to the notes, and those don’t translate to a static PDF.
#
Each note has thumbs up and thumbs down buttons. Votes are stored in Supabase, keyed by note slug and a hashed IP so someone can’t vote multiple times on the same note. Raw IPs are never stored, only their salted hash. This gives me a quick signal on which notes are useful and which need work.
# Style validator
As the number of notes are growing, I wanted a deterministic way to check whether all of them followed the same writing style.
I build an Astro integration. Every note is checked against a set of style
rules, things like broken internal links, em dashes in titles, missing labels or
descriptions, and adjacent notes that don’t line up. It runs on every bun dev
as a warning, and fails the production build if any note breaks a rule.
On development, I can scope it to a single semester, module, or note, so I don’t have to wait on a full scan.
#
A friend, Rakeshan, started contributing notes for a module in Semester 5. I added an authors collection so a note can declare its own author, defaulting to me. Each author gets a color, and the byline shows up on the note page as well as in its SEO and social metadata.
# How I do it?
For S1, I typed 100% of the notes myself. After each lecture, I spend some time reviewing the slides and revising. In this time, I also update my notes as well. It took more time but helped me understand the concepts better.
For S2 onwards, I used ChatGPT to generate the initial drafts. I then review and modify the content to ensure accuracy and clarity. This approach saves me time while still allowing me to engage deeply with the material.
Few of my friends use the website for reference, and assist me in finding missing content as well as inaccurate ones.
I am hoping to keep this website up, through all my 8 semesters. Let’s see how it goes.