This post demonstrates the sidenotes featureSidenotes are margin notes that appear beside the paragraph they reference, popularized by Edward Tufte’s work on information design. in XenT. Unlike traditional footnotes that appear at the bottom of the page, sidenotes appear in the margin on wide screens and as inline pop-ins on narrow screens.

Continue reading

YouTube Component Demo

The XenT theme includes a responsive YouTube embedding component that automatically handles aspect ratios, accessibility, and responsive behavior.

Basic Usage

Simply use the YouTube directive with a video ID:

::youtube{id="dQw4w9WgXcQ" title="Rick Astley - Never Gonna Give You Up"}

Or with just the video ID:

::youtube[dQw4w9WgXcQ]

Example: Responsive Embed

Here’s a responsive YouTube embed that maintains a 16:9 aspect ratio:

Component Features

The YouTube component supports several configuration options:

Required Props

  • videoId: The YouTube video ID (from the URL)
  • title: Video title for accessibility (optional but recommended)

Optional Props

  • start: Start time in seconds
  • autoplay: Enable autoplay (not recommended for UX)
  • showRelated: Show related videos at end
  • width/height: Custom dimensions (overrides responsive behavior)

Advanced Example

Here’s an example with custom start time:

Technical Implementation

The component features:

  • Responsive Design: Automatically maintains 16
    aspect ratio
  • Accessibility: Proper iframe titles and attributes
  • Performance: Lazy loading and minimal overhead
  • Privacy: No cookies until user interaction
  • Clean Styling: Integrates with XenT theme design system
  • Print Support: Shows video title when printed

Usage in Markdown

To use in your markdown posts, simply add the directive:

Your content here...

:youtube{id="YOUR_VIDEO_ID" title="Your video title"}

Or with just the video ID for simple cases:

:youtube[YOUR_VIDEO_ID]

Video ID Extraction

To get the video ID from a YouTube URL:

  • Standard URL: https://www.youtube.com/watch?v=dQw4w9WgXcQdQw4w9WgXcQ
  • Short URL: https://youtu.be/dQw4w9WgXcQdQw4w9WgXcQ
  • Embed URL: https://www.youtube.com/embed/dQw4w9WgXcQdQw4w9WgXcQ

The video ID is the part after v=, after youtu.be/, or after embed/.

Responsive Behavior

The component automatically adapts to different screen sizes:

  • Desktop: Full width with proper aspect ratio
  • Tablet: Maintains responsiveness with smaller margins
  • Mobile: Optimized for small screens with reduced border radius
  • Print: Shows video title instead of iframe

This makes it perfect for content that needs to work across all devices and contexts.

Continue reading

This post is designed to test the sidebar functionality and ensure pixel-perfect reproduction of the NexT theme’s sidebar components. Since there’s no explicit description in frontmatter, this intro paragraph will be automatically extracted and used.

Continue reading

中文内容演示

这是一篇中文演示文章,用于测试XenT主题的多语言支持功能。

中文排版特性

中文文本需要特殊的排版考虑:

  1. 行高调整:中文字符通常需要更高的行高(2.0)来确保可读性
  2. 字体选择:使用适合中文显示的字体栈
  3. 自动检测:主题自动检测CJK字符并调整排版参数

示例段落

这段文字演示了中文内容的排版效果。注意行间距的调整,这对中文可读性很重要。中文字符的密度比拉丁字符更高,因此需要更多的垂直空间来避免视觉拥挤。

与英文混排

在实际使用中,经常会有中英文混排的情况,比如:

  • XenT theme 支持多语言
  • GitHub repository 托管源代码
  • CSS 样式控制排版效果

技术细节

XenT主题通过以下方式实现智能排版:

/* 自动检测CJK字符并应用优化的行高 */
[has-cjk] {
  --line-height-base: 2;
  --line-height-headings: 1.8;
}

主题在构建时自动检测内容中的CJK字符,并为包含中日韩文字的文章应用更适合的行高。这种方式比基于语言标签的方法更精确,能够处理混合语言内容。

结论

智能排版是现代网站的重要功能,XenT主题通过自动CJK字符检测和CSS变量系统实现了精确的排版控制,无需手动配置语言标签。

Continue reading

Overview

XenT now supports GitHub-style callouts through the powerful @r4ai/remark-callout plugin. Create professional-looking information boxes, warnings, and tips that automatically adapt to your chosen theme.

Quick Start

Use this simple syntax to create callouts in your markdown:

> [!note] Remember This
> This is an important note that readers should pay attention to.

> [!warning] Heads Up!
> Be careful when making these changes to avoid breaking your setup.

> [!tip] Pro Tip
> Here's a helpful suggestion to improve your workflow.

For collapsible callouts, add a + after the type:

> [!tip]+ Expandable Content
> This callout can be collapsed and expanded by clicking the title.
> Perfect for optional details or advanced information.

Available Callout Types

Information & Documentation

Note - General information and reminders

Configuration Files

XenT uses a configuration system. Edit user.config.ts in your project root for customizations.

Info - Neutral informational content

Theme Integration

Callouts automatically inherit your theme’s color scheme and design tokens for perfect visual consistency.

Abstract/Summary/TLDR - Key takeaways

Key Concepts

Callouts support multiple types, automatic theming, responsive design, and seamless content integration.

Actions & Tasks

Todo - Action items and tasks

Setup Steps

  1. Install the remark-callout plugin
  2. Configure it in your Astro config
  3. Add CSS styles to match your theme

Tip - Helpful suggestions

Performance Boost

Use callouts sparingly for maximum impact. Too many can overwhelm readers and reduce their effectiveness.

Status & Feedback

Success - Positive outcomes and confirmations

Installation Complete

The callout feature is now active and ready to use in your posts!

Warning - Cautions and important notices

Breaking Changes

This feature requires Astro’s markdown processing. Ensure your content collections are properly configured.

Error/Danger - Critical issues and problems

Common Mistakes

Don’t forget the space after > and before [!type]. Missing spaces will prevent proper rendering.

Communication

Quote - Quotations and references

Design Philosophy

“Great design is not just what it looks like—great design is how it works.” - Steve Jobs

Advanced Usage

Collapsible Callouts

Create expandable callouts using the + syntax for content that users can toggle:

> [!tip]+ Performance Best Practices
> Here are advanced tips that you can expand when needed:
>
> 1. Use callouts strategically, not in every paragraph
> 2. Choose the right type for your content's urgency level
> 3. Keep titles concise but descriptive
Performance Best Practices

Here are advanced tips that you can expand when needed:

  1. Use callouts strategically, not in every paragraph
  2. Choose the right type for your content’s urgency level
  3. Keep titles concise but descriptive

Collapsible Features:

  • Click the title to expand/collapse content
  • Smooth animations with rotating chevron indicator
  • Maintains all standard callout styling and theming
  • Fully keyboard accessible with proper focus states

Nested Callouts

Callouts can be nested inside other callouts for complex information hierarchies:

Advanced Configuration

Here are advanced configuration options:

Breaking Changes

Be careful with these settings as they can break your site.

Performance Tips

These optimizations can improve your build times:

  • Enable incremental builds
  • Use build caching
  • Optimize image processing

Nested Content

Callouts support rich markdown content including code blocks, lists, and links:

Code Example

Here’s how to configure the plugin in your astro.config.ts:

import remarkCallout from '@r4ai/remark-callout';

export default defineConfig({
  markdown: {
    remarkPlugins: [remarkCallout],
  },
});
  • Supports syntax highlighting
  • Works with existing remark plugins
  • Integrates seamlessly with Astro

Multiple Paragraphs

Content Organization

You can include multiple paragraphs in callouts to provide comprehensive information.

This second paragraph demonstrates how content flows naturally within the callout container.

Use this for detailed explanations that need more space.

Theme Integration

Automatic Color Adaptation

XenT’s callout implementation automatically adapts to your chosen theme:

  • Status Colors: Uses semantic color tokens for consistent meaning
  • Surface Integration: Matches card and overlay surfaces
  • Text Contrast: Ensures proper readability across all themes
  • Border Emphasis: Provides clear visual hierarchy

Responsive Design

Callouts are fully responsive and mobile-optimized:

  • Reduced padding on mobile devices
  • Scalable icon sizes
  • Proper touch targets
  • Readable typography at all screen sizes

Best Practices

Content Strategy

Use Sparingly - Callouts are most effective when used strategically, not throughout every paragraph.

Clear Hierarchy - Choose the right type for your content’s purpose and urgency level.

Consistent Voice - Match your callout tone to your overall content style.

Technical Guidelines

Performance Considerations

While callouts are lightweight, avoid overusing them in long-form content as they can create visual fatigue.

Accessibility - Icons and colors provide visual cues, but ensure your text content is self-explanatory.

Print Compatibility - Callouts include print-friendly styles for documentation that needs hard copies.

Implementation Details

Plugin Integration

The callout feature uses the @r4ai/remark-callout plugin, which:

  • Processes markdown at build time
  • Generates semantic HTML with data attributes
  • Supports all standard callout types
  • Works with existing remark plugin ecosystem

CSS Architecture

XenT’s callout styles follow the theme’s design token system:

[data-callout] {
  /* Uses semantic tokens for consistent theming */
  background: var(--callout-bg, var(--surface-card));
  color: var(--callout-text, var(--text-primary));
  border-left: 0.25rem solid var(--callout-accent);
}

Browser Support

Callouts work in all modern browsers and gracefully degrade in older ones:

  • CSS custom properties with fallbacks
  • Semantic HTML structure
  • Progressive enhancement approach

Troubleshooting

Common Issues

Callouts Not Rendering

Missing Plugin Configuration

Ensure remarkCallout is added to your remarkPlugins array in astro.config.ts.

Styling Inconsistencies

CSS Import Order

Verify that callouts.css is imported in your global stylesheet after theme imports.

Mobile Display Problems

Responsive Testing

Test callouts on various screen sizes to ensure proper mobile rendering and readability.

Future Enhancements

XenT’s callout system is designed for extensibility:

  • Custom callout types
  • Icon customization
  • Animation support
  • Interactive variants
Ready to Use

Callouts are now integrated into your XenT theme and ready to enhance your content!

Continue reading

Introduction

This is a test document written in Typst to verify the integration with XenT theme.

Mathematical Expressions

Typst has excellent support for mathematical notation: inline E = mc^2, display

f(x) = \int_{-\infty}^{\infty} \hat{f}(\xi) e^{2\pi i \xi x} d\xi

Code Blocks

def fibonacci(n):
    if n <= 1:
        return n
    return fibonacci(n-1) + fibonacci(n-2)

print(fibonacci(10))

Lists and Structure

  • First item
  • Second item
    • Nested item
    • Another nested item
  • Third item
NameAgeCity
Alice25New York
Bob30London
Carol28Tokyo

This document demonstrates basic Typst features working within the XenT theme structure.

Continue reading

Statistics Validation Post

This is a second test post created specifically to validate that the sidebar statistics are calculated correctly across multiple posts.

Purpose

This post serves to:

  1. Increase post count - Should increment the total posts shown in sidebar
  2. Add unique categories - Includes “Validation” and “Analytics” categories
  3. Add unique tags - Includes “validation”, “statistics”, “count”, “data” tags
  4. Test cross-references - Links back to the sidebar test post

Expected Statistics Impact

When this post is published alongside the sidebar test post, the statistics should show:

Posts Count

  • Should show 2 published posts (or more if other posts exist)
  • Count should exclude any draft posts

Categories Count

  • From sidebar-test.md: Development, Testing, Components (3 unique)
  • From this post: Testing, Validation, Analytics (2 new + 1 overlap)
  • Expected total: 5 unique categories

Tags Count

  • From sidebar-test.md: test, sidebar, components, ui, frontend (5 unique)
  • From this post: validation, statistics, testing, count, data (5 new)
  • Expected total: 10 unique tags

Category Breakdown

This post uses these categories:

  • Testing (shared with sidebar test)
  • Validation (unique to this post)
  • Analytics (unique to this post)

Tag Breakdown

This post uses these tags:

  • validation (unique to this post)
  • statistics (unique to this post)
  • testing (unique to this post)
  • count (unique to this post)
  • data (unique to this post)

Verification Steps

To verify the statistics are working correctly:

  1. Check that the posts count shows at least 2
  2. Verify categories count shows 5 (Development, Testing, Components, Validation, Analytics)
  3. Confirm tags count shows 10 (all unique tags from both posts)
  4. Ensure the counts are clickable and link to archive pages
  5. Verify the counts update dynamically when new content is added

Content Structure

This post includes multiple sections to ensure it’s counted properly and provides sufficient content for testing.

Section One

Sample content to ensure this post has substantial structure.

Section Two

Additional content to verify the post is processed correctly.

Section Three

More content sections for comprehensive testing.

Conclusion

This validation post ensures that the sidebar statistics accurately reflect the content across multiple posts and properly count unique categories and tags.

Continue reading