Skip to content

Add IN_PKGDOWN_PKG? #2976

@maelle

Description

@maelle

When running, pkgdown sets the IN_PKGDOWN variable to TRUE.

IN_PKGDOWN = "true",

Could this behavior be extended to create a variable called IN_PKGDOWN_PKG that'd contain the name of the package currently being documented. Like roxygen2::roxy_meta_get("current_package").

Use case: when you set some specific behavior for your package in the pkgdown website for reasons but don't want that behavior to apply when reverse dependencies of your package build their pkgdown website. https://github.com/cynkra/dm/blob/604a275e496b8cd082db612197fe963f13e46295/R/pkgdown.R#L10

cynkra/dm#2194

I'll open a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions