Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/ci_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI Pipeline for Pull Requests

on:
pull_request:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write

jobs:
# Auto-generate date job to update _config.yml
auto-gen-date:
name: Update ci_last_modified_date in _config.yml
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}
persist-credentials: true
fetch-depth: 0

- name: Set date
id: set_date
run: |
date_value=$(date +'%Y-%m-%d')
echo "date_yyyy_mm_dd=$date_value" >> $GITHUB_ENV
echo "date=$date_value" >> $GITHUB_OUTPUT

- name: Update _config.yml
uses: mikefarah/yq@master
with:
cmd: yq -i '.ci_last_modified_date = "${{ steps.set_date.outputs.date }}"' _config.yml

- name: Commit and Push
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "ci: Auto-update date to ${{ steps.set_date.outputs.date }}"
file_pattern: "_config.yml"
26 changes: 26 additions & 0 deletions .rulesets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Add ruleset(s) using CLI

## Prerequisite
You need to have [GitHub CLI](https://cli.github.com/) installed and authenticated.


## Command to add ruleset
Replace the `$REPONAME` with your repository name, and the file name (`$FILENAME`) of the ruleset JSON file, then run the following command in your terminal:

```bash
gh api -X POST /repos/mdlutoronto/$REPONAME/rulesets --input .rulesets/$FILENAME.json
```

For example, to add the `ci` ruleset to the `jtd-theme` repository, you would run:

```bash
gh api -X POST /repos/mdlutoronto/jtd-theme/rulesets --input .rulesets/ci.json
```

## Bulk Add All Rulesets
To add all rulesets in the `.rulesets` directory, you can wildcard the file name like this:

```bash
gh api -X POST /repos/mdlutoronto/$REPONAME/rulesets --input .rulesets/*.json
```
This command will add all JSON files in the `.rulesets` directory as rulesets to the specified repository.
31 changes: 31 additions & 0 deletions .rulesets/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"id": 8997843,
"name": "ci",
"target": "branch",
"source_type": "Repository",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [],
"include": [
"~DEFAULT_BRANCH"
]
}
},
"rules": [
{
"type": "required_status_checks",
"parameters": {
"strict_required_status_checks_policy": true,
"do_not_enforce_on_create": false,
"required_status_checks": [
{
"context": "CI Pipeline for Pull Requests",
"integration_id": 15368
}
]
}
}
],
"bypass_actors": []
}
42 changes: 6 additions & 36 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
## Site settings
title: "Map & Data Library just the Docs Theme"
description: "Workshops and guides from the Map & Data Library, University of Toronto"
url: "https://MDLutoronto.github.io/jtd-theme" # change the slug to the repo's name ('jtd-theme' in this case)
url: "https://MDLutoronto.github.io/jtd-theme" # change the slug to the repo's name ('jtd-theme' in this case)
repository: "MDLutoronto/jtd-theme" # for github-metadata

## Navigation footer logos and links
## Change it only if you want to use different logos or links
## Logos should be placed in the /assets/images/ directory, or you can use an external image link
nav_footer_logo_bottom: "/assets/images/UTL.png"
nav_footer_logo_bottom_href: "https://library.utoronto.ca/"
nav_footer_logo_top: "/assets/images/mdl_full_logo.png"
nav_footer_logo_top_href: "https://mdl.library.utoronto.ca/"


## License information
## If left empty, a default Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license will be used
license_name: "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"
license_url: "https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en" # link to the license
license_image_url: "https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by-nc-sa.svg" # image Link or image file path for the license

# # Aux links for the upper right search bar (optional)
# # Uncomment if you want to have the aux links (right side of the top nav bar)
# aux_links:
# "Map & Data Library":
# - "https://mdl.library.utoronto.ca/"
# "U of T Libraries":
# - "https://library.utoronto.ca/"
# "U of T Libraries":
# - "https://library.utoronto.ca/"

## Workshop series name to be displayed in the footer (optional)
# workshop_series_name: "Map & Data Library Workshop Series"
Expand All @@ -38,15 +34,11 @@ license_image_url: "https://mirrors.creativecommons.org/presskit/buttons/88x31/s
# 🚨 DANGER ZONE 🚨
# ONLY CHANGE BELOW THIS LINE IF YOU KNOW WHAT YOU ARE DOING
#################################################

baseurl: "" # the subpath of your site, e.g. /blog

# Link for the site title in the sidebar; set to "/" for homepage
title_link: "https://mdlutoronto.github.io/tutorials-search/"

title_link: "https://mdlutoronto.github.io/tutorials-search/"
# # Makes Aux links open in a new tab. Default is false
aux_links_new_tab: true

# # External navigation links that appear in the sidebar and shows after all the sub-pages
# # Each link must have a title and a url
nav_external_links:
Expand All @@ -59,19 +51,15 @@ nav_external_links:

# # Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define
color_scheme: mdl

# # Remote theme
remote_theme: "MDLutoronto/jtd-theme"

permalink: pretty

defaults:
- scope:
path: "docs" # an empty string here means all files in the project
type: "pages"
values:
layout: "default"

exclude:
# from https://github.com/jekyll/jekyll/blob/master/lib/site_template/_config.yml:
- .sass-cache/
Expand Down Expand Up @@ -99,7 +87,6 @@ exclude:
- Dockerfile
# theme test code
- fixtures/

# Set a path/url to a logo that will be displayed instead of the title
#logo: "/assets/images/just-the-docs.png"

Expand Down Expand Up @@ -131,10 +118,8 @@ search:
button: false
# Focus the search input by pressing `ctrl + focus_shortcut_key` (or `cmd + focus_shortcut_key` on macOS)
focus_shortcut_key: "k"

# For copy button on code
enable_copy_code_button: true

# By default, consuming the theme as a gem leaves mermaid disabled; it is opt-in
mermaid:
# Version of mermaid library
Expand All @@ -148,45 +133,34 @@ mermaid:
# for (<v10):
# path: "/assets/js/mermaid.min.js"
# Note: copy both `mermaid.esm.min.mjs` (v10+) or `mermaid.min.js` (<v10) and the associated `.map` file from the specified version of `mermaid/dist` to `/assets/js/`.

# Enable or disable heading anchors
heading_anchors: true

# Enable or disable the side/mobile menu globally
# Nav menu can also be selectively enabled or disabled using page variables or the minimal layout
nav_enabled: true

# Sort order for navigation links
# nav_sort: case_insensitive # default, equivalent to nil
nav_sort: case_sensitive # Capital letters sorted before lowercase


# Show navigation error report
nav_error_report: true # default is false/nil.

liquid:
error_mode: strict
strict_filters: true

# Footer content
# appears at the bottom of every page's main content

# Back to top link
back_to_top: true
back_to_top_text: "Back to top"

# Footer last edited timestamp
last_edit_timestamp: false # Keep this be `false`, since it's set inside the footer_custom.html ; use `last_modified_date` in the page's front matter instead


# # Footer "Edit this page on GitHub" link text
# gh_edit_link: true # show or hide edit this page link
# gh_edit_link_text: "Edit this page on GitHub"
# gh_edit_repository: "https://github.com/just-the-docs/just-the-docs" # the github URL for your repo
# gh_edit_branch: "main" # the branch that your docs is served from
# # gh_edit_source: docs # the source that your files originate from
# gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately

callouts_level: quiet # or loud
callouts:
highlight:
Expand All @@ -203,26 +177,22 @@ callouts:
warning:
title: Warning
color: red

# Google Analytics Tracking (optional)
# Supports a CSV of tracking ID strings (eg. "UA-1234567-89,G-1AB234CDE5")
# Note: the main Just the Docs site does *not* use Google Analytics.
# ga_tracking: UA-2709176-10,G-5FG1HLH3XQ
# ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true/nil by default)

plugins:
- jekyll-seo-tag
- jekyll-github-metadata
- jekyll-include-cache
- jekyll-sitemap
# - jekyll-toc
- jekyll-remote-theme

kramdown:
syntax_highlighter_opts:
block:
line_numbers: false

compress_html:
clippings: all
comments: all
Expand All @@ -232,7 +202,7 @@ compress_html:
profile: false
# ignore:
# envs: all

sass:
quiet_deps: true # https://github.com/just-the-docs/just-the-docs/issues/1541
silence_deprecations: ['import'] # https://github.com/just-the-docs/just-the-docs/issues/1607
silence_deprecations: ["import"] # https://github.com/just-the-docs/just-the-docs/issues/1607
ci_last_modified_date: "2025-11-14" # automatically updated by GitHub Actions workflow ci_pr.yml. The format is 'YYYY-MM-DD'.
3 changes: 2 additions & 1 deletion _includes/footer_custom.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{%- if site.footer_content -%}
<p class="text-small text-grey-dk-100 mb-0">{{ site.footer_content }}</p>
{%- else -%}
{%- if page.created_date and page.created_date != '' -%}Content created: {{ page.created_date | date: "%B %d, %Y" }}{%- endif -%}{%- if page.created_date and page.created_date != '' and page.last_modified_date and page.last_modified_date != '' -%}&nbsp;&nbsp;|&nbsp;&nbsp;{%- endif -%}{%- if page.last_modified_date and page.last_modified_date != '' -%}Last updated: {{ page.last_modified_date | date: "%B %d, %Y" }}{%- endif -%}
{%- if page.created_date and page.created_date != '' -%}First created: {{ page.created_date | date: "%B %d, %Y" }}{% endif -%}
<br>Last updated: {{ page.last_modified_date | default: site.ci_last_modified_date | date: "%B %d, %Y"}}
{%- if site.workshop_series_name and site.workshop_series_name != '' -%}
<p class="text-small text-grey-dk-100 mb-0"> This workshop is part of the {{ site.workshop_series_name }}</p>
{%- endif -%}
Expand Down
3 changes: 2 additions & 1 deletion docs/children.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: children
layout: page
nav_order: 1
description:
last_modified_date: 2025-10-06
created_date:
# last_modified_date: # Only use it when you want to override the auto-updated date.
parent: Home
---
This is the First Children page!
3 changes: 2 additions & 1 deletion docs/children_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: children 2
layout: page
nav_order: 2
description:
last_modified_date: 2025-10-06
created_date:
# last_modified_date: # Only use it when you want to override the auto-updated date.
parent: Home
---
This is the Children 2 page!
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ layout: home
nav_order: 1
description:
permalink: /
last_modified_date: 2025-10-06
created_date:
# last_modified_date: # Only use it when you want to override the auto-updated date.
has_children: true
---

Expand Down
2 changes: 1 addition & 1 deletion docs/sink.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Sink
layout: page
nav_order: 2
description:
last_modified_date: 2025-10-06
# last_modified_date: # Only use it when you want to override the auto-updated date.
created_date: 2024-10-01
parent: Home
staff_name: Ken Lui
Expand Down
3 changes: 2 additions & 1 deletion docs/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: Rendering Tables from CSV
layout: page
nav_order: 2
description: How to render tables from CSV files in Jekyll
last_modified_date: 2025-10-14
created_date:
# last_modified_date: # Only use it when you want to override the auto-updated date.
parent: Home
---
# Table of Contents
Expand Down