12 Contributor instructions
This chapter gives you all the information you need to upload your community contribution. Please read this entire document carefully before making your submission. Of particular note is the fact that the Quarto book format requires a different .qmd format than you’re used to, so you must make changes to the beginning of the file as described below before submitting.
12.1 Background
This web site makes use of Quarto to render a collection of .qmd files into a nicely formatted online book with chapters and subchapters. Your job will be to submit a slightly modified version of your community contribution .qmd file to the GitHub repository where the source files for this web site are stored. On the backend, the admins will divide the chapters into book sections and order them.
12.2 Submitting your first pull request
Workflow: contributing to a repository that you do not have write access to.
Fork this repo.
Clone your fork.
Add an upstream remote.
Create a new branch.
Copy your
.qmdfile into the new branch fromtestprojector create a new.qmdfile and copy and paste the content.[OPTIONAL] Add your data to the
data/folder, if relevant.When ready*, commit and push your work to GitHub and create a pull request..
At this point a back and forth will begin with the team managing the pull requests. If you are asked to make changes, simply make the changes on your local branch, save, commit, and push to GitHub. The new commits will be added to your pull request; you do not need to, and should not, create a new pull request. (If, based on the circumstances, it does make sense to close the pull request and start a new one, we will tell you.)
12.3 Preparing your .qmd file
You should only submit ONE .qmd file.
Create a concise, descriptive name for your file, such as
gardens.qmdorhousing.qmd. The words only and joined with underscores, no white space. Use.qmdnot.Qmd. In addition, all letters must be lowercase.Completely delete the YAML header (the section at the top of the
.qmdthat includes name, title, date, output, etc.) including the---line.Choose a short, descriptive, human readable title for your project as your title will show up in the table of contents – look at examples in the panel on the left. Use title case for your chapter title. On the first line of your document, enter a single hashtag, followed by a single whitespace, and then your title. Do not use single
#headers anywhere else in the document.The second line should be blank, followed by your name(s):
# NYC playgrounds Your name Your content starts here.Your file should not contain any of the following: file paths that are unique to your computer
/users/yourname/...,getwd(),setwd(),write()statements (unless commented out),install.packages()
12.4 Submitting subsequent pull requests
ONCE: Please follow the instructions in this issue to sync with the newly reduced size repo.
IN GENERAL: after a previous pull request is merged, sync your fork (I recommend following the instructions for doing so in the terminal, not using the “Sync fork” button), delete your old branch (remote and local), stop tracking the old branch, create a new branch and follow the usual procedure described above for doing work and submitting a new pull request.