Note that this package requires you to have Git configured on your computer. You may utilize the following if you prefer watching a video version:
Otherwise, if you prefer, you may read Git's official guide.
To generate a DACSS course blog, you can run the following command:
blogbuilder::create_dacss_blog()
Simply follow the instructions that display in the RStudio console.
Students should be instructed to create draft
posts—as in they need to run the following function when creating a post:
distill::create_post('TITLE OF POST', draft = TRUE)
It is important that they have draft = TRUE
when the post is initially created or draft: yes
in the YAML header of the post itself:
Once you are satisfied with all student posts, you can render them and make them public (accessible through the homepage for example).
Run the following function to do so:
blogbuilder::build_all_posts()
When the function completes, you will recieve a preview of your site with all the posts displayed on the homepage.
To create student pages, you can import student names with the following command:
blogbuilder::create_student_pages(spreadsheet = 'path/to/students.csv', names_col = 1)
Running the example above reads in a spreadsheet called 'students.csv' and the student names is directed to be in the first column of the spreadsheet.
The function takes in multiple arguments:
blogbuilder::generate_student_pages(spreadsheet = 'path/to/students.xlsx',
names_col = 'name',
sheet = 'data')
The example above reads in the spreadsheet 'students.xlsx' in the sheet 'data', and student names is in the column 'name' of the spreadsheet.
Once students are done editing their pages, you can render them and make them accessible to the public—similar to how the post system works.
You can do so by running the function:
blogbuilder::build_student_pages()
All student pages will be accessible through the Student page on the website.
You may update various parts of the site through the following functions.
blogbuilder::update_course_title('NAME OF NEW TITLE')
Arguments: - title (required): the new course title
blogbuilder::update_course_semester('NAME OF NEW SEMESTER')
Arguments: - semester (required): the new semester
Students should be instructed to exclude the docs
folder. This will avoid site building issues for instructors and future merge conflicts on GitHub.
blogbuilder::exclude_docs()
blogbuilder::exclude_dir('/path/to/dir')
Arguments: - path (required): the path to the folder to exclude
blogbuilder::exclude_file('/path/to/file')
Arguments: - path (required): the path to the file to exclude
blogbuilder::get_student_form()
In the scenario the project environment is messed up, you may reset it with the following command:
blogbuilder::reset_project_env()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.