This post demonstrates all the rich features available in this blog.
Contents
- 1. Images & Lightbox
- 2. Syntax Highlighting
- 3. Math Rendering
- 4. Tables (GFM)
- 5. Task Lists
- 6. Footnotes
- 7. Strikethrough & Emphasis
- 8. Blockquotes
- 9. Nested Lists
- 10. GitHub-Style Alerts (Callouts)
- 11. External Links with Favicons
- 12. Multi-Tab Code Snippets
- 13. Collapsible Sections
- 14. CSS Color Chips
- 15. Line Numbers
- 16. Fullscreen Mode
- 17. Typewriter Animation
1. Images & Lightbox
Click on any image to see the lightbox in action!


2. Syntax Highlighting
We use Expressive Code with the Dracula theme for beautiful code blocks with built-in copy buttons.
Python
def hello_world(): print("Hello, World!") return True
# Call the functionhello_world()JavaScript
const future = "web";console.log(`The future of ${future}`); // This line is highlightedTerminal
npm install astro-expressive-codenpm run dev3. Math Rendering
Mathematical equations are rendered using KaTeX.
Inline Math: The energy-mass equivalence formula is .
Block Math: Here is the Fourier Transform:
And the quadratic formula:
4. Tables (GFM)
| Feature | Status | Notes |
|---|---|---|
| Syntax Highlighting | ✅ | Expressive Code |
| Math Equations | ✅ | KaTeX |
| Tables | ✅ | GFM |
| Task Lists | ✅ | GFM |
| Footnotes | ✅ | GFM |
5. Task Lists
- Install Astro
- Add MDX support
- Configure syntax highlighting
- Deploy to production
- Add more blog posts
6. Footnotes
Here’s a sentence with a footnote1. And another one2.
7. Strikethrough & Emphasis
This is deleted text and this is bold and italic and bold italic.
8. Blockquotes
“The only way to do great work is to love what you do.”
— Steve Jobs
9. Nested Lists
- First item
- Sub-item A
- Sub-item B
- Sub-sub-item
- Second item
- Third item
10. GitHub-Style Alerts (Callouts)
Use blockquote syntax with [!TYPE] for styled callouts:
[!NOTE] Useful information that users should know, even when skimming content.
[!TIP] Helpful advice for doing things better or more easily.
[!IMPORTANT] Key information users need to know to achieve their goal.
[!WARNING] Urgent info that needs immediate user attention to avoid problems.
[!CAUTION] Advises about risks or negative outcomes of certain actions.
11. External Links with Favicons
External links automatically display the website’s favicon:
Check out GitHub for open source projects, YouTube for tutorials, and MDN Web Docs for web documentation.
Other useful sites: Stack Overflow and npm.
12. Multi-Tab Code Snippets
Use the <Tabs> and <TabItem> components to group related code blocks into tabs:
{ "name": "my-app", "scripts": { "dev": "astro dev", "build": "astro build" }}export const config = { siteName: "My Awesome Blog", baseUrl: "https://blog.radith.my.id"};.container { max-width: 1200px; margin: 0 auto; padding: 1rem;}13. Collapsible Sections
Long code blocks can have sections collapsed to focus on what matters:
5 collapsed lines
// These imports are collapsed by defaultimport { something } from 'somewhere';import { another } from 'another-place';import { yetAnother } from 'yet-another';const CONFIG = { debug: true };
// This is the main function you care aboutfunction doSomething(input) { return input.toUpperCase();}
4 collapsed lines
// Helper functions collapsed belowfunction helper1() { return 1; }function helper2() { return 2; }function helper3() { return 3; }14. CSS Color Chips
Color values in CSS automatically get a preview chip:
:root { --primary: #ff6b6b; --secondary: rgb(78, 205, 196); --accent: hsl(45, 100%, 60%); --dark: #2d3436; --light: rgba(255, 255, 255, 0.9);}
.button { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: 2px solid #333;}15. Line Numbers
Enable line numbers with showLineNumbers:
def fibonacci(n): """Generate the first n Fibonacci numbers.""" if n <= 0: return [] elif n == 1: return [0]
fib = [0, 1] while len(fib) < n: fib.append(fib[-1] + fib[-2]) return fib
# Generate first 10 Fibonacci numbersresult = fibonacci(10)print(result)You can also start from a specific line number with startLineNumber:
// This continues from line 42const answer = 42;console.log(`The answer is ${answer}`);16. Fullscreen Mode
All code blocks have a fullscreen button (appears on hover). Click it to view the code in fullscreen mode!
interface User { id: number; name: string; email: string; createdAt: Date;}
class UserService { private users: User[] = [];
addUser(user: User): void { this.users.push(user); }
findUser(id: number): User | undefined { return this.users.find(u => u.id === id); }
getAllUsers(): User[] { return [...this.users]; }}17. Typewriter Animation
Terminal blocks can have a typewriter effect (animation plays when visible):
$ npm create astro@latest my-new-project$ cd my-new-project$ npm install$ npm run devThat’s all the features! 🎉
0 Comments