Skip to content

Commit ce9e9dc

Browse files
authored
Merge pull request #342 from berkeley-cdss/docs
Some more docs updates
2 parents 4ee296c + 119c08e commit ce9e9dc

12 files changed

Lines changed: 255 additions & 62 deletions

File tree

.github/dependabot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ updates:
33
- package-ecosystem: bundler
44
directory: "/"
55
schedule:
6-
interval: daily
7-
open-pull-requests-limit: 10
6+
interval: weekly
7+
open-pull-requests-limit: 5

.github/workflows/docs.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Docs Build
2+
3+
on:
4+
push:
5+
paths:
6+
- 'docs/**'
7+
pull_request:
8+
paths:
9+
- 'docs/**'
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: docs
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Ruby
22+
uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: '3.3'
25+
bundler-cache: true
26+
working-directory: docs
27+
28+
- name: Build Jekyll site
29+
run: bundle exec jekyll build --baseurl /flextensions
30+
env:
31+
JEKYLL_ENV: production
32+
PAGES_REPO_NWO: berkeley-cds/flextensions
33+
34+
- name: Check for broken internal links
35+
run: |
36+
# Verify all internal .html files were generated
37+
echo "Generated site files:"
38+
find _site -name '*.html' | sort
39+
echo ""
40+
echo "Checking for broken internal links..."
41+
# Extract internal href links and verify they resolve
42+
broken=0
43+
for file in $(find _site -name '*.html'); do
44+
# Extract href values pointing to /flextensions/ paths
45+
grep -oP 'href="(/flextensions/[^"]*)"' "$file" 2>/dev/null | while read -r match; do
46+
path=$(echo "$match" | grep -oP '"/flextensions/[^"]*"' | tr -d '"')
47+
# Convert URL path to file path
48+
local_path="_site${path#/flextensions}"
49+
# Check if it's a directory (index.html) or file
50+
if [ -d "$local_path" ] && [ -f "$local_path/index.html" ]; then
51+
continue
52+
elif [ -f "$local_path" ]; then
53+
continue
54+
elif [ -f "${local_path}.html" ]; then
55+
continue
56+
elif [ -f "${local_path%/}/index.html" ]; then
57+
continue
58+
else
59+
echo "::warning file=$file::Broken link: $path (resolved to $local_path)"
60+
broken=1
61+
fi
62+
done
63+
done
64+
if [ "$broken" -eq 1 ]; then
65+
echo "::warning::Some internal links may be broken. Check warnings above."
66+
fi

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,9 @@ yarn-debug.log*
8181
/config/credentials/production.key
8282

8383
.DS_Store
84+
85+
# Jekyll docs
86+
docs/_site/
87+
docs/.jekyll-cache/
88+
docs/.jekyll-metadata
89+
docs/Gemfile.lock

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ Cite the software itself using the following DOI:
8181

8282
https://doi.org/10.5281/zenodo.17246291
8383

84-
References:
85-
8684
```
8785
# IEEE
8886
[1]M. Ball, “Flextensions”. Zenodo, Aug. 20, 2025. doi: 10.5281/zenodo.17246291.

app/controllers/session_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def logout
3535

3636
def omniauth_callback
3737
if params[:error].present?
38+
Rails.logger.error("OmniAuth callback error: #{params[:error_description] || params[:error]}")
3839
redirect_to root_path, alert: 'Authentication failed. Please try again.'
3940
return
4041
end

app/controllers/user_to_courses_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def toggle_allow_extended_requests
1010
render json: { success: true }, status: :ok
1111
else
1212
flash[:alert] = "Failed to update enrollment: #{@enrollment.errors.full_messages.to_sentence}"
13-
render json: { redirect_to: course_path(@course) }, status: :unprocessable_entity
13+
render json: { redirect_to: course_path(@course) }, status: :unprocessable_content
1414
end
1515
end
1616

docs/Gemfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
source "https://rubygems.org"
2+
3+
gem "jekyll", "~> 4.3"
4+
gem "jekyll-theme-primer", "~> 0.6"
5+
6+
group :jekyll_plugins do
7+
gem "jekyll-feed", "~> 0.12"
8+
gem "jekyll-seo-tag", "~> 2.8"
9+
end
10+
11+
# Windows and JRuby does not include zoneinfo files
12+
platforms :mingw, :x64_mingw, :mswin, :jruby do
13+
gem "tzinfo", ">= 1", "< 3"
14+
gem "tzinfo-data"
15+
end

docs/README.md

Lines changed: 26 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,42 @@
1-
---
2-
title: Flextensions - Assignment Extension Management for Canvas
3-
permalink: /
4-
---
5-
6-
<!-- NOTE to Authors: all absolute URLs should start with /flextensions/
7-
-->
1+
# Flextensions Documentation
82

9-
# Welcome to Flextensions 👋 [][flextensions]
3+
This directory contains the source files for the Flextensions documentation site, served at [berkeley-cdss.github.io/flextensions](https://berkeley-cdss.github.io/flextensions).
104

11-
[**Flextensions**][flextensions] is your one-stop solution to manage and access assignment extensions across all your UC Berkeley courses*. Whether you're course staff or a student, Flextensions streamlines extension workflows and makes extension data easy to access and manage.
5+
The site is built with [Jekyll](https://jekyllrb.com/) and deployed automatically via GitHub Pages from the `docs/` directory on `main`.
126

13-
_* Well, all of your courses which use bCourses or Gradescope and enable assignment extensions. :)_
14-
15-
[flextensions]: https://flextensions.berkeley.edu
16-
17-
---
7+
## Local Development
188

19-
## 🚀 What Does Flextensions Do?
9+
```bash
10+
cd docs
11+
bundle install
12+
bundle exec jekyll serve
13+
```
2014

21-
### [🧑‍🏫 For Course Staff](/flextensions/instructors/):
22-
- View and manage extensions requests for all assignments in your course.
23-
- Grant extensions to students with a few clicks.
24-
- Monitor extension usage across your course.
25-
- Automate approving extension requests and email sending
15+
Then visit http://localhost:4000/flextensions/.
2616

27-
### [🎓 For Students](/flextensions/students/):
28-
- View all your granted extensions in one place.
29-
- See how long your extension lasts and when the new due date is.
30-
- Stay informed and organized without checking multiple systems.
17+
## Directory Structure
3118

32-
---
19+
- `*.md` — Documentation pages (each has YAML front matter with `title` and `permalink`)
20+
- `_config.yml` — Jekyll configuration
21+
- `api/` — Swagger/OpenAPI reference (static HTML, not processed by Jekyll)
22+
- `img/` — Images used in documentation
23+
- `_site/` — Generated output (gitignored)
3324

34-
## 🔧 How It Works
25+
## Adding a Page
3526

36-
Flextensions connects directly with bCourses (Canvas) and imports your assignments. The interface is intuitive and role-based—course staff can grant and manage, while students can view.
27+
Create a new `.md` file with front matter:
3728

29+
```markdown
3830
---
39-
40-
Are you a developer? Check out the [Developer Documentation](/flextensions/developers/) documention to contribute to Flextensions and the [API Reference](/flextensions/api/) to learn how to integrate Flextensions with your own applications.
41-
42-
Want to know what's new? See the [Updates page](/flextensions/updates/) for recent changes or visit the [GitHub Releases](https://github.com/berkeley-cdss/flextensions/releases) for a full changelog.
43-
31+
title: Your Page Title
32+
permalink: /your-page/
4433
---
4534

46-
## Credits
47-
48-
Flextensions was originally developed by students in [CS169L](https://saasbook.info), during the Spring 2024 and Spring 2025 semesters, as part of the [Software as a Service](https://saasbook.info) course at UC Berkeley.
49-
50-
Student developers (in alphabetical order):
35+
Content here...
36+
```
5137

52-
* Connor Bernard, Spring 2024
53-
* Cynthia Lixinyi, Spring 2024
54-
* [Diandian Liu](https://www.linkedin.com/in/diandian-liu/), Spring 2025
55-
* [Eric Huang](https://huanger2.github.io), Spring 2025
56-
* Evan Kandell, Spring 2024
57-
* Sepehr Behmanesh Fard, Spring 2024
58-
* [Tashrique Ahmed](https://tashrique.com), Spring 2025
59-
* [Tianye Meng](https://www.linkedin.com/in/tianye-meng-611b22253/), Spring 2025
60-
* [Yaman Tarakji](https://www.linkedin.com/in/yaman-tarakji-602530196), Spring 2025
61-
* Zee Babar, Spring 2024
38+
Internal links should use absolute paths starting with `/flextensions/`, e.g. `[Developers](/flextensions/developers/)`.
6239

63-
[Michael Ball][mball], Armando Fox, and Lisa Yan are the faculty members who have overseen the development of Flextensions.
40+
## CI
6441

65-
[mball]: https://mball.co/
42+
The `Docs Build` workflow (`.github/workflows/docs.yml`) validates the Jekyll build and checks for broken internal links on PRs that touch `docs/`.

docs/_config.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
title: Flextensions
2+
description: Assignment Extension Management for Canvas
3+
baseurl: /flextensions
4+
url: https://berkeley-cdss.github.io
5+
6+
# Build settings
7+
markdown: kramdown
8+
theme: jekyll-theme-primer
9+
10+
# Exclude from processing
11+
exclude:
12+
- Gemfile
13+
- Gemfile.lock
14+
- README.md
15+
- .jekyll-cache
16+
- _site
17+
18+
# Include the API docs (static HTML)
19+
include:
20+
- api
21+
22+
# Default front matter
23+
defaults:
24+
- scope:
25+
path: ""
26+
values:
27+
layout: default

docs/index.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: Flextensions - Assignment Extension Management for Canvas
3+
permalink: /
4+
---
5+
6+
<!-- NOTE to Authors: all absolute URLs should start with /flextensions/
7+
-->
8+
9+
# Welcome to Flextensions 👋 [][flextensions]
10+
11+
[**Flextensions**][flextensions] is your one-stop solution to manage and access assignment extensions across all your UC Berkeley courses*. Whether you're course staff or a student, Flextensions streamlines extension workflows and makes extension data easy to access and manage.
12+
13+
_* Well, all of your courses which use bCourses or Gradescope and enable assignment extensions. :)_
14+
15+
[flextensions]: https://flextensions.berkeley.edu
16+
17+
---
18+
19+
## 🚀 What Does Flextensions Do?
20+
21+
### [🧑‍🏫 For Course Staff](/flextensions/instructors/):
22+
- View and manage extensions requests for all assignments in your course.
23+
- Grant extensions to students with a few clicks.
24+
- Monitor extension usage across your course.
25+
- Automate approving extension requests and email sending
26+
- Use as an [API](/docs/api/index.html) to integrate with your own tools and systems.
27+
28+
### [🎓 For Students](/flextensions/students/):
29+
- View all your granted extensions in one place.
30+
- See how long your extension lasts and when the new due date is.
31+
- Stay informed and organized without checking multiple systems.
32+
33+
---
34+
35+
## 🔧 How It Works
36+
37+
Flextensions connects directly with bCourses (Canvas) and imports your assignments. The interface is intuitive and role-based—course staff can grant and manage, while students can view.
38+
39+
---
40+
41+
Are you a developer? Check out the [Developer Documentation](/flextensions/developers/) documention to contribute to Flextensions and the [API Reference](/flextensions/api/) to learn how to integrate Flextensions with your own applications.
42+
43+
Want to know what's new? See the [Updates page](/flextensions/updates/) for recent changes or visit the [GitHub Releases](https://github.com/berkeley-cdss/flextensions/releases) for a full changelog.
44+
45+
Interested in the research behind Flextensions? Check out the [Research page](/flextensions/research/).
46+
47+
---
48+
49+
## Credits
50+
51+
Flextensions is currently maintained by [Michael Ball][mball], [Continuing Lecturer in EECS][mb_eecs]. It has been developed by students in [CS169L](https://saasbook.info), during the Spring 2024, 2025 and 2026 semesters, as part of the [Software as a Service](https://saasbook.info) course at UC Berkeley.
52+
53+
The Flextensions project has been generously supported by the [Research, Teaching, and Learning](https://teaching.berkeley.edu) and the [Office of the Vice Provost for Undergraduate Education](https://ue.berkeley.edu) at UC Berkeley through the [Seamless Learning Project](https://berkeley-cdss.github.io/seamless-learning/).
54+
55+
Student developers (in alphabetical order):
56+
57+
* Connor Bernard, Spring 2024
58+
* Cynthia Lixinyi, Spring 2024
59+
* [Diandian Liu](https://www.linkedin.com/in/diandian-liu/), Spring 2025
60+
* [Eric Huang](https://huanger2.github.io), Spring 2025
61+
* Evan Kandell, Spring 2024
62+
* Sepehr Behmanesh Fard, Spring 2024
63+
* [Tashrique Ahmed](https://tashrique.com), Spring 2025
64+
* [Tianye Meng](https://www.linkedin.com/in/tianye-meng-611b22253/), Spring 2025
65+
* [Yaman Tarakji](https://www.linkedin.com/in/yaman-tarakji-602530196), Spring 2025
66+
* Zee Babar, Spring 2024
67+
68+
Armando Fox, and Lisa Yan are faculty members who have also overseen the development of Flextensions and make significant contributions to the project.
69+
70+
[mball]: https://mball.co/
71+
[mb_eecs]: https://www.eecs.berkeley.edu/Faculty/Homepages/mball.html

0 commit comments

Comments
 (0)