Project Directory Structure
Introduction
For your project, you will be creating a website. Importantly, you must keep our files organized and easily accessible. A well-structured directory helps us to collaborate efficiently, reduce errors, and facilitate project maintenance. Let’s explore the purpose of each directory in our project structure.
R Studio Project Files
<projectname>.Rproj(should match your R Studio Directory and your GitHub Repository Name)
Project Directory Structure
.
├── .git
├── .gitignore
├── .nojekyll
├── .quarto
├── about.qmd
├── api/
│ └── call_apis.R <-------------------------------------
├── blog/
│ ├── _metadata.yml
│ ├── index.qmd
│ └── posts/
├── figs/
├── fonts/
│ └── fontawesome.html
├── images/
│ ├── icons/
│ ├── random_png.png
│ └── profile.jpg
├── index.qmd
├── pages/
│ ├── my_first_page.qmd
│ └── my_second_page.qmd
├── <projectname>.Rproj
├── robots.txt
└── src/
├── data/
├── figs/
├── functions/
│ ├── fig_saving.R
│ ├── fig_theme.R
│ ├── load_libraries.R
│ └── view_html.R
├── starter_script_file.R
└── utils/
└── made-of-code.tmTheme
└── styles/
Configuration Files
These configuration files are stored in the project root (.) directory:
.git: contains Git version control system files (do not delete).gitignore: specifies files and directories that Git should ignore (e.g, your.Renviron,.Rprofile, and other sensitive details) (do not delete).nojekyll: tells GitHub Pages not to use Jekyll to build the site.quarto: for Quarto-specific configuration files.
Website Files and Directories
about.qmd: a website about page (do not delete)docs/: for all rendered website filesindex.qmd: a website start page (do not delete)pages/: for individual web pagesrobots.txt: This file specifies how search engines should crawl our site.styles/: for website theme related files
Source Code
The src/ directory contains our project source code:
src/
data/
figs/
functions/
fig_saving.R
fig_theme.R
load_libraries.R
view_html.R
starter_script_file.R
utils/
made-of-code.tmTheme
data/: for data,raw/andprocessed/figs/: for.pngfigures created with {ggplot2} codefunctions/: reusable functions needed for the projectutils/: for project utility files
Figures and Images
The following directories contain figures and image files:
figs/
images/
icons/
figs/: for figures generated by codeimages/: for image filesicons/: for icon filesrandom_png.pngandprofile.jpg: example files
Brand Directory
brand/
brand/: for_brand.ymland related files
Blog Directory
The blog directory contains files related to our project blog:
blog/
_metadata.yml
index.qmd
posts/