RELEASES

Centralized Metadata Example

New: Centralized Metadata System

This example demonstrates the new centralized metadata system. Notice how the metadata is defined once in the front matter (at the top of this file) and automatically used by all modules below.

Benefits:

  • No duplication - Define metadata once, use everywhere
  • Easy maintenance - Update in one place
  • Cleaner code - Modules only specify content, not data
  • Backwards compatible - Old works still function

How It Works

The split-hero-metadata module above displays:

  • The hero image on the left (2/3 width)
  • Metadata on the right (1/3 width)

Again, no metadata fields were specified in that module. It automatically pulled all values from the front matter metadata field.

You can still override specific fields per-module if needed, but for most use cases, defining metadata once is much cleaner.

Standalone Metadata Display

The metadata module above is even simpler. It’s just:

- type: metadata

That’s it! No need to repeat all the fields. It automatically displays the front matter metadata in a clean grid layout.

Centralized Metadata Example
Centralized Metadata Example
Centralized Metadata Example

Migration Guide

To convert existing works to use centralized metadata:

  1. Copy all metadata fields from your sections into a metadata: field in the front matter
  2. Remove the metadata fields from individual sections
  3. Keep only the content-specific parameters (image, embed_code, caption, etc.)

Example transformation:

Before:

sections:
  - type: split-hero-metadata
    image: /assets/img/photo.jpg
    year: "2024"
    location: "Paris"
    role: "Composer"

After:

metadata:
  year: "2024"
  location: "Paris"
  role: "Composer"

sections:
  - type: split-hero-metadata
    image: /assets/img/photo.jpg

Much cleaner! 🎉

The centralized metadata system makes maintaining complex work pages so much easier. Define once, use everywhere!

— Portfolio Developer