Skip to contents

Inspects a directory to determine its project type, subtype, and readiness for llms documentation generation. This function is the public project resolution entrypoint and returns a structured object that automation pipelines can branch on.

Usage

as_project(path = ".")

Arguments

path

Path to the project root. Defaults to the current directory.

Value

An object of class rllmdoc_project with:

type

"quarto" or "rpkg". The primary project type.

subtype

For Quarto: "website", "book", "default", etc. For R packages: "pkgdown" if configured, "base" otherwise.

root

Absolute path to the project root.

title

Project title from _quarto.yml or DESCRIPTION.

description

Project description.

llms_ready

Logical. TRUE if the project is configured for llms.txt generation (llms-txt: true for Quarto, pkgdown present for R packages).

site_exists

Logical. TRUE if rendered site output exists.

config

The raw parsed project config (list).

Examples

if (FALSE) { # \dontrun{
proj <- as_project()
proj$type
proj$subtype
proj$llms_ready
} # }