diff --git a/.github/workflows/ci_pr.yml b/.github/workflows/ci_pr.yml index 3cb9741..c3fd3a8 100644 --- a/.github/workflows/ci_pr.yml +++ b/.github/workflows/ci_pr.yml @@ -13,7 +13,7 @@ permissions: jobs: # Auto-generate date job to update _config.yml - auto-gen-date: + update-ci-last-modified-date: name: Update ci_last_modified_date in _config.yml runs-on: ubuntu-latest permissions: @@ -41,5 +41,5 @@ jobs: - name: Commit and Push uses: stefanzweifel/git-auto-commit-action@v7 with: - commit_message: "ci: Auto-update date to ${{ steps.set_date.outputs.date }}" + commit_message: "ci: Auto-update date to ${{ steps.set_date.outputs.date }} [skip ci]" file_pattern: "_config.yml" \ No newline at end of file diff --git a/.rulesets/README.md b/.rulesets/README.md deleted file mode 100644 index 542149a..0000000 --- a/.rulesets/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# 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. \ No newline at end of file diff --git a/.rulesets/ci.json b/.rulesets/ci.json deleted file mode 100644 index 587f780..0000000 --- a/.rulesets/ci.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "id": 9967948, - "name": "ci", - "target": "branch", - "source_type": "Repository", - "source": "MDLutoronto/jtd-theme", - "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": "Update ci_last_modified_date in _config.yml", - "integration_id": 15368 - } - ] - } - } - ], - "bypass_actors": [] -} \ No newline at end of file diff --git a/README.md b/README.md index c3a5f4d..ee08234 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,6 @@ # Map and Data Library JTD Theme This is a customized version of the [Just the Docs](https://just-the-docs.com) theme for the [Map and Data Library](https://mdl.library.utoronto.ca) at the [University of Toronto Libraries](https://www.library.utoronto.ca). -# Using the template -This repository is a [GitHub template repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) that you can use to create your own documentation site using the [Just the Docs](https://just-the-docs.com) theme. - -To create a new site using this template, click the green "Use this template" button above. This will create a new repository in your GitHub account with the contents of this repository. - # Using as a remote theme You can use this repository as a remote theme, powered by the [jekyll-remote-theme plugin](https://github.com/benbalter/jekyll-remote-theme). @@ -22,73 +17,7 @@ Also, you need to install the `jekyll-remote-theme` (version 0.4.3) gem by addin gem "jekyll-remote-theme", "~> 0.4.3" ``` -# Configuration options -## Site options -You can set the following options in your site's `_config.yml` file to customize site-wide information: - -### Workshop series name (optional) -- workshop_series_name: Set this to the name of your workshop series to have it displayed in that page. For example: -```yaml -workshop_series_name: "NAME OF YOUR WORKSHOP SERIES" -``` -This will display `This workshop is part of the {{NAME OF YOUR WORKSHOP SERIES}}` in the footer of each page. - -### License (optional) -By default, the theme displays a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license icon in the footer of each page, linking to the [CC BY-NC-SA 4.0 license](https://creativecommons.org/licenses/by-nc-sa/4.0/). - -You can set the following options to display license information in the footer of the site that applies to all pages: - -- license_name: Set this to the name of the license. For example: -```yaml -license_name: "CC BY 4.0" -``` -- license_url: Set this to the URL of the license. For example: -```yaml -license_url: "https://creativecommons.org/licenses/by-nc-sa/4.0/" -``` -- license_image_url: Set this to the URL of the license image you want to display. For example: -```yaml -license_image_url: "https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by-nc-sa.svg" -``` -Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International icon - -## Page options -You can set the following options in the front matter of your pages to customize the footer information: - -### Dates -- created_date: Set this to the date the page was created. For example: -```yaml -created_date: 2025-10-06 -``` -- last_modified_date: Set this to the date the page was last modified. For example: -```yaml -last_modified_date: 2025-10-07 -``` -This will display `Content created: October 06, 2025 | Last updated: October 07, 2025` in the footer of the page. - -If only one of these options is set, only that information will be displayed. - -### Staff information -- staff_name: Set this to the name of the staff member who created the page. For example: -```yaml -staff_name: Ken Lui -``` -- staff_link: Set this to the URL of the staff member's profile or website. For example: -```yaml -staff_link: https://library.utoronto.ca/staff/ken-lui -``` -This will display `Tutorial created by Ken Lui` in the footer of the page, with `Ken Lui` being a link to the specified URL. If no link is provided, the name will be displayed as plain text. - -### Student staff information (optional) -- student_name: Set this to the name of the student staff member who created the page. For example: -```yaml -student_name: Jane Doe -``` -- student_link: Set this to the URL of the student staff member's profile or website. For example: -```yaml -student_link: https://library.utoronto.ca/staff/jane-doe -``` -This will display `Tutorial created by Jane Doe` in the footer of the page, with `Jane Doe` being a link to the specified URL. If no link is provided, the name will be displayed as plain text. +Every time you push changes to your repository, GitHub Pages will automatically fetch the latest version of the theme from this repository. # Development ## Testing the theme locally diff --git a/_config.yml b/_config.yml index 8845424..e65cc38 100644 --- a/_config.yml +++ b/_config.yml @@ -205,4 +205,4 @@ compress_html: 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 -ci_last_modified_date: "2025-11-14" # automatically updated by GitHub Actions workflow ci_pr.yml. The format is 'YYYY-MM-DD'. +ci_last_modified_date: "2025-11-18" # automatically updated by GitHub Actions workflow ci_pr.yml. The format is 'YYYY-MM-DD'. diff --git a/_data/another_data.csv b/_data/another_data.csv deleted file mode 100644 index 675f80a..0000000 --- a/_data/another_data.csv +++ /dev/null @@ -1,3 +0,0 @@ -another_data_column1,another_data_column2 -hello, -,data2 diff --git a/_data/csv_data.csv b/_data/csv_data.csv deleted file mode 100644 index 70f6eb7..0000000 --- a/_data/csv_data.csv +++ /dev/null @@ -1,3 +0,0 @@ -column1,column2,empty column,column4 -hello,link,,https://mdl.library.utoronto.ca/ -2,3,,() diff --git a/docs/children.md b/docs/children.md deleted file mode 100644 index 1a839ab..0000000 --- a/docs/children.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: children -layout: page -nav_order: 1 -description: -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! \ No newline at end of file diff --git a/docs/children_2.md b/docs/children_2.md deleted file mode 100644 index 838f00a..0000000 --- a/docs/children_2.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: children 2 -layout: page -nav_order: 2 -description: -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! \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 8b94a99..03f9016 100644 --- a/docs/index.md +++ b/docs/index.md @@ -9,5 +9,4 @@ created_date: has_children: true --- -# This is the Home page! -This is the Home page! \ No newline at end of file +See the [README](https://github.com/MDLutoronto/jtd-theme/blob/main/README.md) for documentation about this theme. diff --git a/docs/sink.md b/docs/sink.md deleted file mode 100644 index 2beeea6..0000000 --- a/docs/sink.md +++ /dev/null @@ -1,368 +0,0 @@ ---- -title: Sink -layout: page -nav_order: 2 -description: -# 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 -staff_link: https://example.com/ken-lui -student_staff_name: Jane Doe -student_staff_link: https://example.com/jane-doe ---- -This is the Sink page! ---- - - - - - -Text can be **bold**, _italic_, or ~~strikethrough~~. - -[Link to another page]({{site.baseurl}}/). - -There should be whitespace between paragraphs. - -There should be whitespace between paragraphs. We recommend including a README, or a file with information about your project. - -# Header 1 - -This is a normal paragraph following a header. GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. - -## Header 2 - -> This is a blockquote following a header. -> -> When something is important enough, you do it even if the odds are not in your favor. - -### Header 3 - -```js -// Javascript code with syntax highlighting. -var fun = function lang(l) { - dateformat.i18n = require('./lang/' + l) - return true; -} -``` - -```ruby -# Ruby code with syntax highlighting -GitHubPages::Dependencies.gems.each do |gem, version| - s.add_dependency(gem, "= #{version}") -end -``` - -#### Header 4 `with code not transformed` - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -[This is a very long link which wraps and therefore doesn't overflow -even when it comes at the beginning](.) of the line. - -- [This is a very long link which wraps and therefore doesn't overflow the line - when used first in an item ](.) in a list. - -| head1 | head two | three | -|:-------------|:------------------|:------| -| ok | good swedish fish | nice | -| out of stock | good and plenty | nice | -| ok | good `oreos` | hmm | -| ok | good `zoute` drop | yumm | - -### There's a horizontal rule below this. - -* * * - -### Here is an unordered list: - -* Item foo -* Item bar -* Item baz -* Item zip - -### And an ordered list: - -1. Item one -1. Item two -1. Item three -1. Item four - -### And an ordered list, continued: - -1. Item one -1. Item two - -Some text - -{:style="counter-reset:none"} -1. Item three -1. Item four - -### And an ordered list starting from 42: - -{:style="counter-reset:step-counter 41"} -1. Item 42 -1. Item 43 -1. Item 44 - -### And a nested list: - -- level 1 item - - level 2 item - - level 2 item - - level 3 item - - level 3 item -- level 1 item - - level 2 item - - level 2 item - - level 2 item -- level 1 item - - level 2 item - - level 2 item -- level 1 item - -### Nesting an ol in ul in an ol - -- level 1 item (ul) - 1. level 2 item (ol) - 1. level 2 item (ol) - - level 3 item (ul) - - level 3 item (ul) -- level 1 item (ul) - 1. level 2 item (ol) - 1. level 2 item (ol) - - level 3 item (ul) - - level 3 item (ul) - 1. level 4 item (ol) - 1. level 4 item (ol) - - level 3 item (ul) - - level 3 item (ul) -- level 1 item (ul) - -### And a task list - -- [ ] Hello, this is a TODO item -- [ ] Hello, this is another TODO item -- [x] Goodbye, this item is done - -### Nesting task lists - -- [ ] level 1 item (task) - - [ ] level 2 item (task) - - [ ] level 2 item (task) -- [ ] level 1 item (task) -- [ ] level 1 item (task) - -### Nesting a ul in a task list - -- [ ] level 1 item (task) - - level 2 item (ul) - - level 2 item (ul) -- [ ] level 1 item (task) -- [ ] level 1 item (task) - -### Nesting a task list in a ul - -- level 1 item (ul) - - [ ] level 2 item (task) - - [ ] level 2 item (task) -- level 1 item (ul) -- level 1 item (ul) - - -### Labels - -I'm a label -{: .label } - -blue -{: .label .label-blue } -green -{: .label .label-green } -purple -{: .label .label-purple } -yellow -{: .label .label-yellow } -red -{: .label .label-red } - -**bold** -{: .label } -*italic* -{: .label } -***bold + italic*** -{: .label } - -### Definition lists can be used with HTML syntax. - -
-
Name
-
Godzilla
-
Born
-
1952
-
Birthplace
-
Japan
-
Color
-
Green
-
- -#### Multiple description terms and values - -Term -: Brief description of Term - -Longer Term -: Longer description of Term, - possibly more than one line - -Term -: First description of Term, - possibly more than one line - -: Second description of Term, - possibly more than one line - -Term1 -Term2 -: Single description of Term1 and Term2, - possibly more than one line - -Term1 -Term2 -: First description of Term1 and Term2, - possibly more than one line - -: Second description of Term1 and Term2, - possibly more than one line - -### More code - -```python{% raw %} -def dump_args(func): - "This decorator dumps out the arguments passed to a function before calling it" - argnames = func.func_code.co_varnames[:func.func_code.co_argcount] - fname = func.func_name - def echo_func(*args,**kwargs): - print fname, ":", ', '.join( - '%s=%r' % entry - for entry in zip(argnames,args) + kwargs.items()) - return func(*args, **kwargs) - return echo_func - -@dump_args -def f1(a,b,c): - print a + b + c - -f1(1, 2, 3) - -def precondition(precondition, use_conditions=DEFAULT_ON): - return conditions(precondition, None, use_conditions) - -def postcondition(postcondition, use_conditions=DEFAULT_ON): - return conditions(None, postcondition, use_conditions) - -class conditions(object): - __slots__ = ('__precondition', '__postcondition') - - def __init__(self, pre, post, use_conditions=DEFAULT_ON): - if not use_conditions: - pre, post = None, None - - self.__precondition = pre - self.__postcondition = post -{% endraw %}``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -### Mermaid Diagrams - -The following code is displayed as a diagram only when a `mermaid` key supplied in `_config.yml`. - -```mermaid -graph TD; - accTitle: the diamond pattern - accDescr: a graph with four nodes: A points to B and C, while B and C both point to D - A-->B; - A-->C; - B-->D; - C-->D; -``` - -### Collapsed Section - -The following uses the [`
`](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections) tag to create a collapsed section. - -
-Shopping list (click me!) - -This is content inside a `
` dropdown. - -- [ ] Apples -- [ ] Oranges -- [ ] Milk - -
- -# Images -This is how to include images that is part of the repository. The "relative_url" filter is required to ensure the correct path is used regardless of whether the site is served from the root or a subpath. - -This is the code to include the image, if you put the image in the `assets/images` folder: -```html -UTL -``` -UTL - -# Embed videos (iframe) - -You can embed videos using an ` -``` -It is recommended to set the width to `100%` and use `style="aspect-ratio: 16/9; max-width: 740px;"` to ensure the video scales properly on different screen sizes. Modify the code as follows: -```html - -``` - -Here is an example of embedding a MyMedia video: - diff --git a/docs/table.md b/docs/table.md deleted file mode 100644 index 155bfa4..0000000 --- a/docs/table.md +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: Rendering Tables from CSV -layout: page -nav_order: 2 -description: How to render tables from CSV files in Jekyll -created_date: -# last_modified_date: # Only use it when you want to override the auto-updated date. -parent: Home ---- -# Table of Contents -{: .no_toc } -1. Table of Contents -{:toc} - -# Data from CSV - -You can create tables from CSV files stored in the `_data` folder of your Jekyll site. - -## Prerequisites - -First, create a CSV file in the `_data` folder. For example, create `_data/data.csv` with your tabular data. - -## Basic Usage - -To render a table from your CSV file: - -Assign the CSV data to a variable: - -```liquid -{% raw %}{% assign csv_data = site.data.csv_data %}{% endraw %} -``` - -Create the table structure: - -```liquid -{% raw %} - - - {% for header in csv_data.first %} - - {% endfor %} - - - - {% for row in csv_data %} - - {% for cell in row %} - - {% endfor %} - - {% endfor %} - -
{{ header[0] }}
{{ cell[1] }}
{% endraw %} -``` - -## Example Output - -{% assign csv_data = site.data.csv_data %} - - - - {% for header in csv_data.first %} - - {% endfor %} - - - - {% for row in csv_data %} - - {% for cell in row %} - - {% endfor %} - - {% endfor %} - -
{{ header[0] }}
{{ cell[1] }}
- -## Using Multiple CSV Files - -To use a different CSV file (e.g., `_data/another_data.csv`), simply change the file name in the assign statement: - -```liquid -{% raw %}{% assign another_data = site.data.another_data %} - - - - - {% for header in another_data.first %} - - {% endfor %} - - - - {% for row in another_data %} - - {% for cell in row %} - - {% endfor %} - - {% endfor %} - -
{{ header[0] }}
{{ cell[1] }}
{% endraw %} -``` - -### Output from another_data.csv - -{% assign another_data = site.data.another_data %} - - - - {% for header in another_data.first %} - - {% endfor %} - - - - {% for row in another_data %} - - {% for cell in row %} - - {% endfor %} - - {% endfor %} - -
{{ header[0] }}
{{ cell[1] }}
- -## Table with no header -If your CSV file does not have a header row, you can skip the header section in the table: - -```liquid -{% raw %} - - {% for row in csv_data %} - - {% for cell in row %} - - {% endfor %} - - {% endfor %} - -
{{ cell[1] }}
{% endraw %} -``` -### Output from no_header_data.csv - -{% assign no_header_data = site.data.csv_data %} - - - {% for row in no_header_data %} - - {% for cell in row %} - - {% endfor %} - - {% endfor %} - -
{{ cell[1] }}
\ No newline at end of file