How to start creating a blog for your senior project?

Blog Post Repository

This post includes creating a blog by using distill package in R.

Lisa Lei
03-22-2021

Step 1. Create a New Repository

You can create a new repository for your senior project in github. Here is how to do it:

  1. In the upper right corner, next to your avatar or identicon, click + and then select New repository.

  1. Name your repository. You can name it something like “SeniorProject_SP2021”

  2. Write a short description.

  3. Select Initialize this repository with a README.

Click “Create repository”.

Step 2. Create a Branch

It’s always good to create a new branch for keeping bug fixes and feature work separate from our main (production) branch. When a change is ready, they merge their branch into main. Here is how to create a new branch:

  1. Go to your new repository.

  2. Click the drop down at the top of the file list that says branch: main.

  3. Type a branch name, maybe something like “master”, into the new branch text box.

  4. Select the blue Create branch box or hit ???Enter??? on your keyboard.

Now you have two branches, main and another one you just named. They look exactly the same.

Step 3. Connect your repository with R

  1. Create a new project in R.

  2. Select “Version Control”, then “Git”, then paste your repository URL, click Create Project.

Step 4. Use Distill package to create your blog

You can call the Distill create_blog() function:

### First install Distill package
install.packages("distill")

library(distill)
create_blog(dir = "my-blog", title = "My Blog")

The basic scaffolding for a blog and an initial welcome post will be created within the my-blog sub-directory.

The welcome post is just there to provide some skeletal content for the blog, you can delete it and add your own initial post to the blog.

Creating a post

The easiest way to start authoring a new post is to call the create_post() function from within your blog???s directory. For example:

library(distill)
create_post("[YOUR POST NAME HERE]")

This will create a sub-directory for your post within the _posts directory, add a stub Distill article, and open the article for editing.

These are the basic steps of how to start creating a blog for your senior project, for more information like how to edit the Configuration, Renaming posts, Listing pages, RSS feed, Post drafts, please refer to this website. This website also explains how to add other features to your blog, like allowing others to comment and share your post, adding citation, preview images, source code, site search to your blog. It also explains how to edit or change the theme of your blog.

Citation

For attribution, please cite this work as

Lei (2021, March 22). BYU-I Data Science Society: How to start creating a blog for your senior project?. Retrieved from https://byuidss.github.io/posts/2021-03-22-how-to-start-creating-a-blog-for-your-senior-project/

BibTeX citation

@misc{lei2021how,
  author = {Lei, Lisa},
  title = {BYU-I Data Science Society: How to start creating a blog for your senior project?},
  url = {https://byuidss.github.io/posts/2021-03-22-how-to-start-creating-a-blog-for-your-senior-project/},
  year = {2021}
}