Skip to content

Latest commit

 

History

History
10 lines (9 loc) · 2.43 KB

File metadata and controls

10 lines (9 loc) · 2.43 KB

Tutorial for creating your personal website

  1. Create a new repository on GitHub. Your repository should have a name pertaining to your website (Ex. my_website) and be public, at a minimum. You may also add a README file for new users of your repository, a .gitignore (template: R) to specify which files to track changes on, and a license (MIT) to tell others what they can and cannot do with your code.
  2. Follow this tutorial to clone the repository to your local computer. This just means that the files you created on GitHub are stored in your computer's folders. Once this is done, you can edit your files on your local computer and send them back up to GitHub!
  3. On your local computer, create a folder within your cloned repsitory folder and call it "docs". (Note: use this exact file name to ensure that the template will work for you).
  4. Download and save copies of _site.yml, cmu.png, contact_info.Rmd, cornell.png, index.Rmd, phd.Rmd, photo_of_me.png, style.css, and undergrad.Rmd. Do not change any file names!
  5. Open and knit the following files to .html: contact_info.Rmd, index.Rmd, phd.Rmd, and undergrad.Rmd.
  6. "Push" (upload) your changes back to GitHub using the following steps: 1) Open up GitBash, 2) Navigate to your website directory (Ex. cd Documents/Code/my_website/), 3) Check that your changes were recorded by running the line git status (you should see all the files you added here!), 4) Add the changes to GitHub using the line git add ., 5) Commit the changes to GitHub with a customized and explanatory comment by running the line git commit -m "my comment here", 6) Send the changes to GitHub using the line git push.
  7. Publish your website by navigating to the "Settings" menu of your repository and scrolling to the "Pages" menu on the left-hand side of the screen. Under the "Source" header, select the branch of your website as "main" and select the "docs" folder. GitHub will load your website and give you a message saying your site is ready to be published at https://githubusername.github.io/website_template/
  8. Now, customize the template with your own information by making edits to the .Rmd files. When you're done editing, knit your .Rmd files to .html. You can add and edit pages to your website structure using the _site.yml file. Follow the instructions in step #6 to update your changes on GitHub.