Skip to content

[Feature Request] Option to hide the front matter section #532

@oyashiroboy

Description

@oyashiroboy

Problem Description

When editing content with long frontmatter sections (thumbnail, datetime, tags, draft status, author, isNew flags, etc.), the actual content preview area becomes too far down the page, making it difficult to quickly preview the main content.

Additionally, with the recent addition of the PreviewStyle feature, the section headers (h-tags showing field names like "Frontmatter" or "Body") can visually interfere with design verification, especially when checking custom preview styles.

Proposed Solution

Add an option to hide section headers in the preview pane. This would include:

  • Frontmatter section headers
  • Body/content section headers
  • Other field group headers

This could be implemented as:

  • A global setting in configuration
  • A per-collection setting
  • A toggle button in the preview UI

Use Case

Sites with extensive frontmatter fields need to scroll significantly before reaching the actual content preview. Hiding these section headers would:

  • Improve the preview experience for content editors
  • Reduce visual clutter when verifying custom preview styles
  • Allow better focus on the actual rendered content

Additional Notes

  • If there's already a way to hide these headers, please let me know! I may have missed existing functionality.
  • I understand that the StyleTemplate feature (if/when implemented) might address this issue more comprehensively
  • However, even as an interim solution, this would be greatly appreciated

Thank you as always for your excellent work on SveltiaCMS!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions