Skip to content
Go back

Demo Post - Multi-Author Support & Enhanced Features

Updated:
Authors: Mayank, Pranav Patel

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:

  1. Multi-Author Support: You can now specify multiple authors in the frontmatter using an array format
  2. Reduced Line Height: Line spacing has been reduced by 10% for a more compact, professional look
  3. 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:

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:

  1. First major point

    • Sub-point one with some additional text to demonstrate spacing
    • Sub-point two with more content
    • Sub-point three
  2. 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
  3. 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:

Demo image
This figure caption demonstrates the reduced line height in 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:

satnaing/astro-paper

A minimal, responsive, accessible and SEO-friendly Astro blog theme

vercel/next.js

The React Framework for Production

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:

google/flan-t5-base

model

FLAN-T5 is an instruction-tuned version of T5. It has been fine-tuned on a mixture of tasks.

glue

dataset

General Language Understanding Evaluation benchmark for assessing natural language understanding systems

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:

Conclusion

All three features work together to create a more polished and professional blog experience:

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

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.


Share this post on: