This is a demonstration blog post that showcases all the new features we’ve implemented in the AstroPaper theme. You’ll notice several improvements including multiple authors, reduced line height for better readability, and an automatically expanded table of contents.
Table of contents
Open Table of contents
Introduction
This post demonstrates three key enhancements:
- Multi-Author Support: You can now specify multiple authors in the frontmatter using an array format
- Reduced Line Height: Line spacing has been reduced by 10% for a more compact, professional look
- Expanded Table of Contents: The TOC is now expanded by default for better accessibility
Multi-Author Feature
The frontmatter now supports both single author (string) and multiple authors (array):
# Single author (backward compatible)
author: "John Doe"
# Multiple authors (new feature)
author:
- Manideep
- Pranav Patel
Authors are displayed as styled badges next to the publication date, making it easy to see who contributed to each post.
Line Height Reduction
The line height has been reduced by 10% (from 1.75 to 1.575) to create a more compact and professional appearance. This affects:
- Paragraphs
- List items
- Blockquotes
- Figure captions
You can see the difference in this paragraph. The text feels more tightly spaced while remaining highly readable. This is particularly noticeable when reading longer articles or technical content.
Nested Content Example
Here’s an example with nested lists to show how the line height reduction affects different content types:
-
First major point
- Sub-point one with some additional text to demonstrate spacing
- Sub-point two with more content
- Sub-point three
-
Second major point
- Another nested item
- Yet another nested item with longer text to show how the reduced line height affects readability across different content lengths
-
Third major point
- Final nested example
- This demonstrates the consistent spacing
Table of Contents Behavior
The table of contents is now automatically expanded when the page loads. This means users can immediately see the structure of the article without needing to click to expand it. The TOC remains collapsible if users want to hide it, but the default state is expanded for better accessibility and user experience.
Code Examples
Here’s a code block to demonstrate how code looks with the new line height:
interface BlogPost {
title: string;
author: string | string[];
pubDatetime: Date;
tags: string[];
description: string;
}
function formatAuthors(authors: string | string[]): string {
const authorArray = Array.isArray(authors) ? authors : [authors];
return authorArray.join(", ");
}
Blockquotes
This is a blockquote example. Notice how the reduced line height affects the spacing within blockquotes as well. The text feels more compact while maintaining readability.
Visual Elements
Images
Images are also affected by the line height changes in their captions:
Card Components
We’ve added two new card components for displaying external resources: GitHub Card and Hugging Face Card. These components provide a clean, consistent way to showcase repositories, datasets, and models.
GitHub Card Component
The GitHub card component displays repository information with a GitHub icon. Here are some examples:
Usage in Astro components:
---
import GithubCard from "@/components/GithubCard.astro";
---
<GithubCard
name="satnaing/astro-paper"
description="A minimal, responsive, accessible and SEO-friendly Astro blog theme"
url="https://github.com/satnaing/astro-paper"
/>
Hugging Face Card Component
The Hugging Face card component can display both datasets and models. The component automatically shows a badge indicating the type (dataset or model). Here are examples:
Usage in Astro components:
---
import HuggingFaceCard from "@/components/HuggingFaceCard.astro";
---
<!-- For models -->
<HuggingFaceCard
name="google/flan-t5-base"
description="FLAN-T5 is an instruction-tuned version of T5"
url="https://huggingface.co/google/flan-t5-base"
type="model"
/>
<!-- For datasets -->
<HuggingFaceCard
name="glue"
description="General Language Understanding Evaluation benchmark"
url="https://huggingface.co/datasets/glue"
type="dataset"
/>
Both components feature:
- Hover effects that highlight the border and add a subtle shadow
- Responsive design that works on all screen sizes
- Accessible markup with proper ARIA labels
- Theme-aware styling that adapts to light and dark modes
- Clean, minimal design that matches the AstroPaper aesthetic
Conclusion
All three features work together to create a more polished and professional blog experience:
- Multiple authors allow for proper attribution in collaborative posts
- Reduced line height creates a more compact, magazine-like appearance
- Expanded TOC improves accessibility and helps users navigate content
These enhancements maintain full backward compatibility with existing posts while providing new capabilities for content creators.
Additional Sections
More Content
Here’s additional content to further demonstrate the line height reduction across multiple paragraphs. Each paragraph should feel more compact while remaining easy to read.
Lists and Formatting
- Bold text in lists
- Italic text for emphasis
Inline codeexamples- Links to external resources
Final Thoughts
This demonstration post shows how all the new features work together seamlessly. The reduced line height makes the content feel more professional, while the multi-author support enables better collaboration and attribution.