Welcome to My Blog
This post serves as a fixture to validate Markdown parsing and layout rendering. It's written in standard .md, parsed via marked, sanitized for XSS, and passed through a custom layout engine using express-handlebars.
Markdown Features
I chose to use markdown because it's:
- Easy to write
- Converts to clean HTML
- Supports bold, italic, and
inline code
Engine Details
- Markdown rendered at request time with
gray-matter+marked - HTML output is sanitized via
xss-cleanmiddleware - Layouts are precompiled for performance and cached in memory
- Styling is minimal, composed at build with
postcss-import
Code Example
Code blocks are highlighted using native <pre><code> tags. Language inference and highlighting are not handled by JavaScript on the client—deliberate decision to avoid runtime bloat.
console.log("Hello, world!");