Skip to content

fix: add fediverse:creator meta tag support#703

Merged
harlan-zw merged 1 commit into
mainfrom
feat/fediverse-creator-meta
Mar 25, 2026
Merged

fix: add fediverse:creator meta tag support#703
harlan-zw merged 1 commit into
mainfrom
feat/fediverse-creator-meta

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Mar 25, 2026

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Resolves #26

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Adds support for the fediverse:creator meta tag, used by Mastodon and other Fediverse platforms to attribute content to creators. This enables author highlighting when links are shared across the Fediverse.

// useHead
useHead({ meta: [{ name: 'fediverse:creator', content: '@[email protected]' }] })

// useSeoMeta
useSeoMeta({ fediverseCreator: '@[email protected]' })

Changes:

  • Added fediverse:creator to MetaNames type
  • Added fediverseCreator to MetaFlat interface for useSeoMeta support
  • Added fediverse namespace to NAMESPACES.META for correct camelCase conversion
  • Added fediverse:creator to validation known names and typo detection scope

Reference: https://blog.joinmastodon.org/2024/07/highlighting-journalism-on-mastodon/

Summary by CodeRabbit

  • New Features

    • Added support for Fediverse creator meta tags, enabling proper configuration and validation of Fediverse platform metadata (including Mastodon-compatible tags).
    • Extended type definitions to recognize Fediverse-prefixed meta attributes.
  • Improvements

    • Validation now properly handles Fediverse meta names without reporting false positive typo warnings.

Add support for the fediverse:creator meta tag used by Mastodon and other
Fediverse platforms to attribute content to creators.
@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 36b2b3f0-5db3-4b2e-a717-c5f7675d297c

📥 Commits

Reviewing files that changed from the base of the PR and between b2caf01 and 0870438.

📒 Files selected for processing (4)
  • packages/unhead/src/plugins/validate.ts
  • packages/unhead/src/types/schema/meta.ts
  • packages/unhead/src/types/schema/metaFlat.ts
  • packages/unhead/src/utils/meta.ts

📝 Walkthrough

Walkthrough

This PR adds support for the fediverse:creator meta tag by introducing it to type definitions, validation rules, and namespace configuration across the unhead package, enabling proper type-checking and validation for Fediverse-related metadata.

Changes

Cohort / File(s) Summary
Type System Extensions
packages/unhead/src/types/schema/meta.ts, packages/unhead/src/types/schema/metaFlat.ts
Added 'fediverse:creator' to the MetaNames union type and introduced a new optional fediverseCreator field to the MetaFlat interface with documentation referencing Mastodon support.
Validation & Namespace Configuration
packages/unhead/src/plugins/validate.ts, packages/unhead/src/utils/meta.ts
Expanded meta-name validation to recognize 'fediverse:creator' in the allowlist and extended the typo-detection logic to skip reporting for fediverse-prefixed names; added fediverse namespace key to NAMESPACES.META for proper meta key resolution.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A fediverse friend hops into view,
With 'fediverse:creator' shining anew,
Types and validation all align,
Mastodon metadata, perfectly fine! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR claims to resolve issue #26, which is about updating @babel/types dependency, but the actual changes only add fediverse:creator meta tag support with no dependency updates. The PR changes do not address the linked issue #26's objective of updating @babel/types from ^7.20.2 to ^7.20.5. Either update the dependency or link the correct issue.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'fix: add fediverse:creator meta tag support' clearly describes the main change, which is adding support for the fediverse:creator meta tag.
Description check ✅ Passed The PR description follows the template structure with linked issue, type of change marked (New feature), and a detailed description of the changes made.
Out of Scope Changes check ✅ Passed All changes in the PR are directly related to implementing fediverse:creator meta tag support, which is consistent with the PR objectives described, though misaligned with the linked issue.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fediverse-creator-meta

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@harlan-zw harlan-zw changed the title feat: add fediverse:creator meta tag support fix: add fediverse:creator meta tag support Mar 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Bundle Size Gzipped
Client (Minimal) 10.5 kB 4.3 kB
Server (Minimal) 10.2 kB 4.2 kB
Vue Client (Minimal) 11.4 kB 4.7 kB
Vue Server (Minimal) 11.1 kB 4.6 kB

@harlan-zw harlan-zw merged commit 545c9de into main Mar 25, 2026
5 of 6 checks passed
@harlan-zw harlan-zw mentioned this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant