How to exclude a directory during build - quarto website #10264
-
DescriptionI just started a brand new project using a quarto website layouts generated by RStudio. I have my website that is at the root of my directory as it was created by the template. I also want to have some extra folders in my project for research and just old code. These are not necessarily pages that should be built and I want to exclude them. (base) work@Derecks-MacBook-Air datascope % quarto preview /Users/work/Coding/datascope-playground/datascope/index.qmd --no-browser --no-watch-inputs
pandoc
to: html
output-file: index.html
standalone: true
title-prefix: datascope
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
css:
- styles.css
toc: true
metadata
document-css: false
link-citations: true
date-format: long
lang: en
theme: cosmo
title: datascope
Output created: _site/index.html
Preparing to preview
[ 1/14] deprecated/deprecated-code.Rmd
- The project is out-of-sync -- use `renv::status()` for details.
processing file: deprecated-code.Rmd
1/8
2/8 [setup]
3/8
4/8 [unnamed-chunk-1]
Error in `data$fasttrack_abscorrup_idea_by_country_time %>% mutate(country = countrycode(
country, "iso3c", "country.name")) %>% ggplot(aes(time, abscorrup_idea,
group = country))`:
! could not find function "%>%"
Quitting from lines 14-27 [unnamed-chunk-1] (deprecated-code.Rmd)
Execution halted
(base) work@Derecks-MacBook-Air datascope %
I have searched online and the documentation. I found indications that an exclude statement in the config should be possible but nothing has worked for me. I would want something as simple as this: project:
type: website
website:
title: "datascope"
navbar:
left:
- href: index.qmd
text: Home
- about.qmd
format:
html:
theme: cosmo
css: styles.css
toc: true
exclude:
- "deprecated/" What is the correct way to do this please? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
See render targets: https://quarto.org/docs/websites/index.html#render-targets |
Beta Was this translation helpful? Give feedback.
-
In Quarto docs, I could see an "exclude" option that helps exclude items based on metadata specifics from the listing page, not necessarily by folder. Please see this from official docs: I am planning to utilize this as a workaround for excluding a particular file from the listing page. |
Beta Was this translation helpful? Give feedback.
See render targets: https://quarto.org/docs/websites/index.html#render-targets