Skip to content

Commit

Permalink
Merge branch 'main' into python-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead authored Aug 13, 2024
2 parents b9a62a1 + f55ac9e commit 5c3246b
Show file tree
Hide file tree
Showing 54 changed files with 32,283 additions and 18 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Run all page tests

on: [pull_request, push]
# Run when a PR is opened, any branch is pushed
# Also allow manually triggering workflows, and running if a release is created.
on:
- pull_request
- push
- workflow_dispatch
- deployment
- release

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ _site/

node_modules/
vendor/
!assets/vendor/
tmp/
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require:
- rubocop-rspec
- rubocop-capybara

AllCops:
NewCops: enable
Expand Down
11 changes: 9 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'jekyll', '>= 4.0.0'
gem 'jekyll-sitemap'
gem 'just-the-docs'
gem 'faraday-retry', '~> 2.2'

Check warning on line 6 in Gemfile

View workflow job for this annotation

GitHub Actions / runner / rubocop

[rubocop] reported by reviewdog 🐶 Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem `faraday-retry` should appear before `jekyll`. Raw Output: Gemfile:6:1: C: Bundler/OrderedGems: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem `faraday-retry` should appear before `jekyll`.
gem 'kramdown-parser-gfm'
gem 'webrick'

group :jekyll_plugins do
gem 'jekyll-github-metadata', '~> 2.16'
gem 'jekyll-sitemap'
gem 'just-the-docs'
end

group :development, :test do
gem 'axe-core-capybara'
gem 'axe-core-rspec'
Expand All @@ -19,5 +25,6 @@ end

group :development, :rubocop do
gem 'rubocop', require: false
gem 'rubocop-capybara', require: false
gem 'rubocop-rspec', require: false
end
25 changes: 25 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ GEM
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
faraday (2.10.1)
faraday-net_http (>= 2.0, < 3.2)
logger
faraday-net_http (3.1.1)
net-http
faraday-retry (2.2.1)
faraday (~> 2.0)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
Expand Down Expand Up @@ -74,6 +81,9 @@ GEM
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-github-metadata (2.16.1)
jekyll (>= 3.4, < 5.0)
octokit (>= 4, < 7, != 4.4.0)
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (3.0.0)
Expand All @@ -99,15 +109,21 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.0)
matrix (0.4.2)
mercenary (0.4.0)
mini_mime (1.1.5)
net-http (0.4.1)
uri
nokogiri (1.16.6-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.6-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
octokit (6.1.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
parallel (1.25.1)
parser (3.3.3.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -161,6 +177,8 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-rspec (3.0.1)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
Expand All @@ -172,6 +190,9 @@ GEM
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-x86_64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
selenium-webdriver (4.21.1)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
Expand All @@ -182,6 +203,7 @@ GEM
unicode-display_width (>= 1.1.1, < 3)
thread_safe (0.3.6)
unicode-display_width (2.5.0)
uri (0.13.0)
virtus (2.0.0)
axiom-types (~> 0.1)
coercible (~> 1.0)
Expand All @@ -200,14 +222,17 @@ DEPENDENCIES
axe-core-capybara
axe-core-rspec
capybara
faraday-retry (~> 2.2)
jekyll (>= 4.0.0)
jekyll-github-metadata (~> 2.16)
jekyll-sitemap
just-the-docs
kramdown-parser-gfm
rack-jekyll (>= 0.5.0)
rackup
rspec
rubocop
rubocop-capybara
rubocop-rspec
selenium-webdriver
webrick
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Berkeley Class Site

[![Pages Deployment](https://github.com/berkeley-cdss/berkeley-class-site/actions/workflows/jekyll.yml/badge.svg)](https://github.com/berkeley-cdss/berkeley-class-site/actions/workflows/jekyll.yml)
[![a11y specs](https://github.com/berkeley-eecs/berkeley-class-site/actions/workflows/rspec.yml/badge.svg)](https://github.com/berkeley-eecs/berkeley-class-site/actions/workflows/rspec.yml)

A template for UC Berkeley class websites (with a focus on EECS/CS/DS courses).
Expand Down
77 changes: 62 additions & 15 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,55 @@
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.

# TODO(setup): Typically the course number, "DEPT XXX". it appears on nearly every page. Keep it short. :)
title: Berkeley Class Site
# TODO:(setup): This should be the extended title of your course. e.g. "Introduction to Data Science"
tagline: A Jekyll template for course websites
description: A modern, highly customizable, responsive Jekyll template for course websites
# TODO (template): this should be built from the staff list...
# TODO(template): this should be built from the staff list...
author: Various Bears

# TODO(setup): Set this to the semester, e.g. /sp24, (faXX / spXX / suXX / wiXX )
baseurl: '/berkeley-class-site' # the subpath of your site, e.g. /blog
baseurl: '/berkeley-class-site' # the subpath of your site, which should just be the semester.
# TODO(setup): Set this to your course's domain
url: 'https://berkeley-eecs.github.io' # the base hostname & protocol for your site, e.g. http://example.com
url: 'https://berkeley-eecs.github.io' # the hostname & protocol for your site, e.g. http://example.com

# TODO(setup): This should be one of eecs, dsus, stats
# This controls some footer text, and later custom styling.
course_department: dsus

# The sitemap **must** be enabled. It's published as /baseurl/sitemap.xml
plugins:
- jekyll-sitemap
- jekyll-seo-tag
- jekyll-github-metadata
- jekyll-include-cache


# Course variables
# Course variables can appear in various places around the website, if something isn't used leave it blank.
# TODO(setup): Set all of these course variables
course: SAMPLE 101
course_email: [email protected]
gradescope_course_id: 123456 # you can find this in the Gradescope URL after /courses
bcourses_course_id: 123456 # Same as above, but for bCourses. Leave blank if not in use...
ed_course_id: 123456 # Again, same as above.
sememster: spYY | suYY | faYY # set for the current seemester
# This should be the page of all class archives
# Typically just / for DS courses (with a visible index page), or /archives if you're hosting your own, or a link to the inst.eecs page
# If you have no archive page, comment this line out or leave blank.
class_archive_path: /

# TODO(setup): Set these auxiliary links as you wish - they show up on the top right
aux_links:
Ed:
# TODO(template): Move this to be built-in.
Ed:
- 'https://edstem.org'
OH Queue:
- 'https://oh.c88c.org'
Berkeley Class Site on GitHub:
- 'https://github.com/berkeley-eecs/berkeley-class-site'
# TODO(setup): Set copyright/licensing or any other footer content
footer_content: "Copyright &copy; 2024 UC Berkeley"


# Collections for website data
collections:
Expand Down Expand Up @@ -105,21 +125,30 @@ defaults:
values:
layout: announcement


# TODO(setup): Set all of these course variables
course_email: [email protected]
gradescope_course_id: 123456 # you can find this in the Gradescope URL after /courses

#######
######################################################################
# Just the Docs / Berkeley Class Site Common Config
# Options below here will likely not need to be configured..
######################################################################

# Theme settings
theme: just-the-docs
color_scheme: light
search_enabled: true
heading_anchors: true
permalink: pretty

## Footer Content.
# You should probably not change these, but may add to footer_content if necessary.
# Replace `true` with any additional HTML that you would like to add.
# Footer *must* included the accessibility text defined in footer_custom.html
footer_content: true
back_to_top: true
back_to_top_text: "Back to Top"
last_edit_timestamp: true
last_edit_time_format: '%m %d, %Y at %H:%M'

# Compilation settings used by compress-html plugin:
# https://github.com/penibelst/jekyll-compress-html/tree/v3.2.0?tab=readme-ov-file
compress_html:
clippings: all
comments: all
Expand All @@ -128,14 +157,32 @@ compress_html:
blanklines: false
profile: false

# Files excluded from the Jekyll build
# Native Jeykll build options
# You likely shouldn't need to touch these, but they are documented here just in case.
# https://jekyllrb.com/docs/configuration/options/

# This makes it easier when pushing to a static directory.
# The default false removes files in that directory, which is useful for when you unpublish pages.
# keep_files: false

# Likely not necessary, but a google default for Berkeley
timezone: America/Los_Angeles

# Note: dotfiles are excluded by default. .htaccess is included as a common case.
include:
- LICENSE
- .htaccess

exclude:
- .sass-cache/
- .jekyll-cache/
- gemfiles/
- Gemfile
- Gemfile.lock
- vendor
- vendor/
- README.md
- CONTRIBUTING.md
- .*
- tmp/
- spec/
- docs/
- node_modules/
22 changes: 22 additions & 0 deletions _includes/footer_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- This file comes from Just The Docs.
This footer should be included on all EECS/DS sites.
-->

{%- if site.footer_content and site.footer_content != true -%}
<p class="text-small text-grey-dk-100 m-0">{{ site.footer_content }}</p>
{%- endif -%}

<p class="text-small text-grey-dk-100 my-1">
<a rel="nofollow noopener" href="https://dap.berkeley.edu/get-help/report-web-accessibility-issue" target="_blank" class="pr-2">Accessibility <i class="fa-solid fa-external-link" aria-hidden=true></i></a>
<a rel="nofollow noopener" href="https://ophd.berkeley.edu/policies-and-procedures/nondiscrimination-policy-statement" target="_blank" class="px-2">Nondiscrimination <i class="fa-solid fa-external-link" aria-hidden=true></i></a>
</p>

<!-- Use this to add additional content. -->
<p class="text-small text-grey-dk-100 m-0">
Copyright ©{{ "now" | date: "%Y" }}, Regents of the University of Californa and respective authors.
</p>

<p class="fs-1 text-grey-dk-100 my-1">
This site is built following the <a href="https://github.com/just-the-docs/just-the-docs" target="_bank" rel="noopener">Berkeley Class Site <i class="fa-solid fa-external-link" aria-hidden=true></i></a> template, which is generously based on the <a href="https://github.com/kevinl/just-the-class" target="_bank" rel="noopener">Just the Class <i class="fa-solid fa-external-link" aria-hidden=true></i></a>, and <a href="https://github.com/just-the-docs/just-the-docs" target="_bank" rel="noopener">Just the Docs <i class="fa-solid fa-external-link" aria-hidden=true></i></a> templates.
</p>
6 changes: 6 additions & 0 deletions _includes/head_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- Use this to add global CSS/JS utitlties. -->

<!-- Loading the v6 core styles and the Solid and Brands styles -->
<link href="{{ site.baseurl }}/assets/vendor/fontawesome/css/fontawesome.css" rel="stylesheet" />
<link href="{{ site.baseurl }}/assets/vendor/fontawesome/css/brands.css" rel="stylesheet" />
<link href="{{ site.baseurl }}/assets/vendor/fontawesome/css/solid.css" rel="stylesheet" />
9 changes: 9 additions & 0 deletions _includes/nav_footer_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- This file adds links at the bottom of the sidebar on the left. -->

{% if site.class_archive_path %}
<footer class="site-footer">
<a href="{{ site.class_archive_path }}"
target="_blank" rel="noopener nofollow">View all course offerings
<i class="fa-solid fa-external-link" aria-hidden="true"></i></a>
</footer>
{% endif %}
Loading

0 comments on commit 5c3246b

Please sign in to comment.