% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/knit-print.R
\name{knit_print.livelink}
\alias{knit_print.livelink}
\alias{knit_print.webr_link}
\alias{knit_print.webr_project}
\alias{knit_print.webr_exercise}
\alias{knit_print.webr_directory}
\alias{knit_print.shinylive_link}
\alias{knit_print.shinylive_project}
\alias{knit_print.shinylive_directory}
\title{Render livelink objects as links in knitted documents}
\usage{
\method{knit_print}{webr_link}(x, ...)

\method{knit_print}{webr_project}(x, ...)

\method{knit_print}{webr_exercise}(x, ...)

\method{knit_print}{webr_directory}(x, ...)

\method{knit_print}{shinylive_link}(x, ...)

\method{knit_print}{shinylive_project}(x, ...)

\method{knit_print}{shinylive_directory}(x, ...)
}
\arguments{
\item{x}{A livelink object (a link, project, exercise, or directory).}

\item{...}{Ignored.}
}
\value{
A \code{knit_asis} object (via \code{\link[knitr:asis_output]{knitr::asis_output()}}).
}
\description{
'knitr' calls \code{knit_print()} on the last value of a chunk. Without these
methods a link object would fall back to \code{\link[=print]{print()}}, dumping cli console output
(a header, box glyphs, metadata) into the rendered page. These methods instead
emit a clickable Markdown link, which is almost always what you want when a
link object is the visible result of a chunk.

A single link becomes \verb{[Open in webR](url)} (or Shinylive); a project the
same. A directory or an exercise, which carry several named URLs, become a
bulleted list, one titled link per entry.

These fire only inside 'knitr'. Call \code{\link[=print]{print()}} explicitly for the full cli
description, or \code{\link[=as.character]{as.character()}} for the bare URL.
}
\seealso{
\link{livelink-knitr} for the chunk hook and engine, \code{\link[=format.livelink]{format.livelink()}}
and \code{\link[=as.character.webr_link]{as.character.webr_link()}} for other renderings, and
\code{vignette("links-in-documents", package = "livelink")}.
}
