Enhanced Blog Features Demo

2024-01-15by Twis

Enhanced Blog Features Demo

This post demonstrates the new enhanced features for blog posts including math rendering, syntax highlighting, and styled text.

Math Support

Inline math: The quadratic formula is x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

Block math:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}

Matrix example:

(abcd)(xy)=(ax+bycx+dy)\begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}

Code Highlighting

JavaScript Example

javascript
function fibonacci(n) { if (n <= 1) return n; return fibonacci(n - 1) + fibonacci(n - 2); } console.log(fibonacci(10)); // Output: 55

Python Example

python
def quick_sort(arr): if len(arr) <= 1: return arr pivot = arr[len(arr) // 2] left = [x for x in arr if x < pivot] middle = [x for x in arr if x == pivot] right = [x for x in arr if x > pivot] return quick_sort(left) + middle + quick_sort(right) print(quick_sort([3, 6, 8, 10, 1, 2, 1]))

CSS Example

css
.enhanced-text { background: linear-gradient(45deg, #ff6b6b, #4ecdc4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: bold; transition: all 0.3s ease; } .enhanced-text:hover { transform: scale(1.05); }

Styled Text Features

Bold text appears in yellow for emphasis.

Italic text appears in cyan for subtle highlighting.

Bold and italic combines both styles.

Strikethrough text appears in red.

Lists and Tables

Unordered List

  • First item
  • Second item
    • Nested item
    • Another nested item
  • Third item

Ordered List

  1. First step
  2. Second step
  3. Third step

Table Example

LanguageSyntax HighlightingMath Support
Markdown
LaTeX
HTML

Blockquotes

This is a beautifully styled blockquote that demonstrates the enhanced styling with background color and rounded corners.

It supports multiple paragraphs and maintains consistent formatting.

Inline Code

You can use inline code like const result = Math.sqrt(16) within sentences.


This demonstrates all the enhanced features available in the blog system!