Skip to main content
Web ApplicationCompleted

BlogFolio: Developer Blog and Portfolio Template

BlogFolio is a React and TypeScript blog and portfolio template with typed post blocks, computed reading time, dark mode, consent handling and SEO tags.

DeveloperMustafa Kürşad Başer
Started: Feb 2024Completed: Sep 2024
BlogFolio: Developer Blog and Portfolio Template

BlogFolio is a starter template for the kind of personal site most developers actually want: a blog that handles posts properly, a portfolio that lists work, and SEO that is not an afterthought. It runs on React 18 with TypeScript, Tailwind and Vite, has no backend, and is small enough to fork and bend without untangling someone else's abstractions.

Posts as typed content, not HTML: A post is an array of sections, and each section is one member of a TypeScript union with ten types: text, heading, code, link, divider, image, quote, list, table and alert. Each type carries only its own fields, such as a heading level from 1 to 6, a code language, an image caption, a quote source, an ordered flag for lists, or an info, warning, success or error variant for alerts. The post page renders them through one switch, so adding a block type means one new interface and one new case. Inline Markdown links inside prose are parsed by a small regex helper into anchors that open in a new tab with noopener.

Posts live in a single TypeScript file. The template ships twelve sample posts across five categories, and every one of them uses all ten section types, so the sample content doubles as a rendering test.

Reading time from the content itself: Each post exposes its reading time as a getter computed from its sections, so it is never typed by hand and cannot go stale when a post is edited. Different content reads at different speeds:

  • Prose, headings, quotes and alerts at 200 words a minute
  • Code at 100 words a minute
  • Lists add 30 items a minute on top of their words, tables 20 cells a minute
  • About five seconds for each image

Blog side:

  • A home grid of nine posts per page with a category filter kept in the URL, so a filtered view can be linked, and the page resets when the category changes
  • Search from the header that filters titles and excerpts as you type
  • Code blocks with a language label, line numbers that stay out of a copy selection, and a copy button with a short confirmation
  • Share links for Facebook, X and LinkedIn built from each platform's share URL, plus copy-link
  • An author card and up to two related posts from the same category under each post

Portfolio side:

  • Project cards with images and tags
  • A skills section grouped by area
  • An experience timeline on the About page

The parts that are easy to skip on a personal site:

  • SEO: A component built on react-helmet-async sets the title template, description, keywords, Open Graph and Twitter card tags, the canonical URL when given, and the page language. Posts are marked as articles
  • Dark mode: Starts from the system theme on the first visit, then remembers the setting, with a manual toggle in the header
  • Cookie consent: Analytics and advertising can be accepted or refused separately. The choice is saved with a timestamp, sent to Google Consent Mode when gtag is present, pauses AdSense requests when refused, and on later visits clears the matching cookies
  • Contact form: Posts to Web3Forms with loading, success and error states, so a failed submission shows an error instead of disappearing

Stack:

  • React 18, TypeScript and Vite
  • Tailwind CSS with the typography plugin
  • React Router for five pages and a 404
  • react-helmet-async, date-fns, Lucide icons
  • Folders split by role: pages, components, hooks, utils, types and data

Limits: Code blocks are not syntax highlighted at the token level. The Web3Forms key, recipient address and Analytics measurement ID are placeholders to fill in. A CMS layer and admin surface are on the roadmap, but the template is already useful as a static personal site.

Project Gallery

Tech Stack

ReactTypeScriptTailwind CSSReact HelmetLucide IconsVite