Skip to content

frontmatter

0.3.0Package record

Parse Front Matter from Documents

1packages depend
9.5Kdownloads / year
71.2%test coverage
13/13flavors OK

Overview

About

Extracts and parses structured metadata ('YAML' or 'TOML') from the beginning of text documents. Front matter is a common pattern in 'Quarto' documents, 'R Markdown' documents, static site generators, documentation systems, content management tools and even 'Python' and 'R' scripts where metadata is placed at the top of a document, separated from the main content by delimiter fences.

Changes in 0.3.0
  • format_front_matter() and write_front_matter() now infer the delimiter automatically when delimiter = NULL (the new default). If x was returned by parse_front_matter() or read_front_matter(), the original fence style is preserved; otherwise write_front_matter() falls back to the file extension of path, and finally to "yaml" (#8).
  • Added support for shebang lines (#!) at the start of files. When a file begins with a shebang, the parser now recognizes front matter in comment-wrapped formats (# ---, #' ---) and PEP 723 (# /// script) immediately following the shebang (with zero or one blank lines in between). The shebang line is included in the returned body. format_front_matter() and write_front_matter() also move a leading shebang line above the front matter block when writing (#5).
Show all changes in 0.3.0Hide the rest of the changes in 0.3.0
  • Added SQL front matter support with two comment styles: line comments (-- ---/-- +++) and block comments in compact (/* --- ... --- */) and expanded (/* + --- ... --- + */) forms. Six new delimiter shortcuts are available for write_front_matter(): yaml_sql_line, toml_sql_line, yaml_sql_block_compact, toml_sql_block_compact, yaml_sql_block_expanded, and toml_sql_block_expanded (#4).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.3 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.3.0
READMEYes · 599 wordsVignettesNoNEWSYes · 100% structured · mentions 0.3.0Citation fileNoWebsiteYes · pkgdown
Help pages
3 (1 internal)includes a package overview page
Examples that run
100%2 run in a plain check
Exported functions with examples
100%
Documented parameters
58%
Return-value docs
100%
Help pages citing references
0%

Downloads

9.5K
CRAN downloads in the past year
Rank #3,280 · ~26/day · ~795/mo
Daily download trend is not available in this view yet.
1.4K30 days
3.5K90 days
9.5K1 year
Compare downloads with other packages →
Also on570 r2u

Repository

4Stars
1Forks
0Open issues
0Open PRs
3Releases
57Commits
1Commit identities
57 commits · Last activity 2026-07-05 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
0
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2026-01-09 · 22026-07-07 · 4
PracticesBeta

9 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/posit-dev/frontmatter on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-07-05 · The repository has a site deploy workflow

pkgdown site last built 2026-07-05

Coverage (1)
.covrignore
CRAN release process (1)
cran-comments.md
Show all practicesHide 1 practice
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-01-09
    Seen in the repository: .claude, CLAUDE.md
    Named in .Rbuildignore: .claude, CLAUDE.md
How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
8 external dependencies (excludes base and recommended)

Installing frontmatter adds 4 packages (3 with compiled code, 3.6 MB of source tarballs). Heaviest: yaml12 1.6 MB, tomledit 1.0 MB, rlang 766 KB.

Depends (0)
none
LinkingTo (1)
Suggests (3)
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Depends, Imports or LinkingTo, most downloaded first

People & History

People (2)
Author, Maintainer since 0.1.0 (2026)
Copyright holder, Funder
Releases (3)

Pick two releases to compare their code metrics.

  • 0.3.0Latest
    record
    2026-07-03 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 0.2.0
    record
    2026-02-09 · diff ↗ ·
    added 2 exports
    format_front_matter, write_front_matter
  • 0.1.0
    record
    2026-01-14
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2026-01-14
Total releases
3 / 1 yrs
License
MIT + file LICENSE OSI
Download size
145 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("frontmatter")
Aden-Buie, G., & Posit Software, PBC. (2026). frontmatter: Parse Front Matter from Documents (Version 0.3.0) [Computer software]. https://doi.org/10.32614/CRAN.package.frontmatter

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for frontmatter version 0.3.0 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy