Code Monkey home page Code Monkey logo

quarto-template-for-university-courses's Introduction

Quarto template for university courses

Image Created with DALLΒ·E. Prompt: 'octopus-like alien futuristic teacher, abstract award-winning material design favicon blue flat colours'

Image created with DALLΒ·E. Prompt: 'octopus-like alien futuristic teacher, abstract award-winning material design favicon blue flat colours'

A template for developing university courses using Quarto.

Real Examples:

New to Quarto?

You will need to understand the basics of the following features of Quarto to make the most of this template. It's worth it!

There you go. You might be wondering how to put all of this to work. That is precisely why this template exists!

πŸ’‘ How to use this template

On GitHub:
  1. Click on the green button Use this template then Create a new repository.

  2. Wait for GitHub to copy the files and run the initial setup (you will see this on the Actions tab).

Locally in your computer:
  1. Clone your newly created repository to your computer.

  2. Follow the instructions written below in the 🧰 Dev Setup section.

  3. Skip the R or Python setup if you do not plan on working in one of these languages.

Start editing the files:

Here is a guide of the initial files you might want to modify to remove the sections that refer to the template, leaving only what is relevant to developing/updating the material of your course.

  1. Start by editing the README.md file carefully.

    • Change the title
    • Remove some of the sections
    • Edit the Dev Setup instructions to cater to your needs.
  2. Add your course code and course name to the web pages

    • If you are using VSCode, you can Ctrl + Shift + F (or ⌘ + Shift + F if you are on Mac) and replace all occurrences of MY_COURSE_CODE and MY_COURSE_NAME to the code and name of your course, respectively.
    • Or, you can manually edit those in the following files:
      • _quarto.yml
      • 2023/index.qmd
      • helpers/remove-nav.html
  3. Then move on to _quarto.yml. Scan through this file to spot what you want to change. What pages do you want to keep or remove from your website?

  4. Next, modify the content of index.qmd and start working properly on your content pages under 2023/*

  5. Visualise your changes by running the Quarto website locally:

    quarto preview . --render all --no-browser

🧰 Dev Setup

On top of the setup below, I also recommend you use VSCode as your primary IDE.

🐍 The Python setup

🐍 The Python setup

  1. Install Python 3.8 or higher on your computer.

  2. Install anaconda or miniconda on your computer.

  3. Create a new conda environment:

    conda create -y -n=venv-my-course python=3.10.8

    Never worked with conda environments before? Take some time to read their documentation.

    πŸ’‘ Pro-tip: replace my-course with your course code. Say, for example, venv-ds105.

  4. Activate the environment and make sure you have pip installed inside that environment:

    # the exact `activate` command will vary depending on your OS
    conda activate venv-my-course 

πŸ’‘ Remember to activate this particular conda environment whenever you reopen VSCode/the terminal.

  1. Install required libraries
pip install -r requirements.txt

Now, whenever you open a Jupyter Notebook, you should see the venv-my-course kernel available.

πŸ“Š The R setup

πŸ“Š The R setup

  1. Open a terminal and navigate to the root of this repository.
  2. Ensure you have R version 4.2.2 or higher
  3. Open the R console in this same directory and install renv package:
    install.packages("renv")
  4. Run renv::restore() to install all the packages needed for this project
  5. Whenever you install a new R package, run renv::snapshot() to save it on your renv.
The Quarto setup

The Quarto setup

  1. Install Quarto on your computer.

  2. Run the following command to start the website locally:

    quarto preview . --render all --no-browser

    This will read the instructions from _quarto.yml and render the website locally.

  3. Open your browser and navigate to http://localhost:<port>/. That's it!

πŸ•ΈοΈ Publishing the website

πŸ•ΈοΈ Publishing the website

I recommend you set up a GitHub Action for this. Just follow the instructions in the official Quarto instructions.

πŸ’‘ This template already comes with a GitHub workflow setup. You can find it in the .github/workflows/publish.yml_ file. You just need to rename it to .github/workflows/publish.yml (remove the underscore at the end)

πŸ“Ÿ Contact

βœ‹ Questions? Suggestions? If you are not sure how to do something with the template or have a suggestion for a new feature, start a discussion.

🐞 Spotted any bugs? Create a new Issue.

πŸ–ΌοΈ Want to show us your courses? Share a link to your public page on the discussions page or write me an e-mail.

quarto-template-for-university-courses's People

Contributors

jonjoncardoso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

quarto-template-for-university-courses's Issues

[FEATURE REQUEST] Integrate with Moodle

I am constantly copying HTML pages from the web pages I create with this template over to Moodle. I have not found how to add custom CSS to all Moodle pages, so I always find myself editing the resulting HTML to add inline style CSS -- not the most productive use of my time.

[FEATURE REQUEST] Find an automated way to archive past courses

I use the same website for different iterations of my course (see DS105).

Since my courses are offered twice each academic year, I've resorted to using CSS and JavaScript to differentiate archived pages from the current ones. This involves replacing Quarto's default menu with a version that reflects what students saw when the archived course was active, along with aesthetic changes to prevent confusion between archived and current courses.

Currently, my method is very hacky. I didn't even port it to this template repository because it's ugly πŸ™ƒ . Ideally, I'd like to achieve this directly through Quarto extensions (though I'm not sure it's feasible).

If anyone who happens to read this issue has any suggestions of how to achieve that, let me know!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.