| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/site.R |
| 3 |
\name{fuse_site} |
| 4 |
\alias{fuse_site} |
| 5 |
\title{Fuse R Markdown documents individually under a directory} |
| 6 |
\usage{ |
| 7 |
fuse_site(input = ".") |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{input}{The root directory of the site, or a vector of input file paths.} |
| 11 |
} |
| 12 |
\value{ |
| 13 |
Output file paths (invisibly). |
| 14 |
} |
| 15 |
\description{ |
| 16 |
Run \code{\link[=fuse]{fuse()}} on R Markdown documents individually to generate a website. |
| 17 |
} |
| 18 |
\details{ |
| 19 |
If a directory contains a config file \verb{_litedown.yml}, which has a YAML field |
| 20 |
\code{site}, the directory will be recognized as a site root directory. The YAML |
| 21 |
field \code{output} will be applied to all R Markdown files (an individual R |
| 22 |
Markdown file can provide its own \code{output} field in YAML to override the |
| 23 |
global config). For example: |
| 24 |
|
| 25 |
\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{--- |
| 26 |
site: |
| 27 |
rebuild: "outdated" |
| 28 |
pattern: "[.]R?md$" |
| 29 |
output: |
| 30 |
html: |
| 31 |
meta: |
| 32 |
css: ["@default"] |
| 33 |
include_before: "[Home](/) [About](/about.html)" |
| 34 |
include_after: "© 2024 | [Edit]($input$)" |
| 35 |
--- |
| 36 |
}\if{html}{\out{</div>}} |
| 37 |
|
| 38 |
The option \code{rebuild} determines whether to rebuild \code{.Rmd} files. Possible |
| 39 |
values are: |
| 40 |
\itemize{ |
| 41 |
\item \code{newfile}: Build an input file if it does not have a \code{.html} output file. |
| 42 |
\item \code{outdated}: Rebuild an input file if the modification time of its \code{.html} |
| 43 |
output file is older than the input. |
| 44 |
} |
| 45 |
} |