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
34 changes: 1 addition & 33 deletions .github/workflows/ci_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,4 @@ jobs:
run: python3 -m pip install yamllint

- name: Lint YAML files
run: "yamllint -f github -d '{extends: default, rules: {line-length: disable}}' _data/guides.yml"

# Auto-generate date job to update _config.yml
auto-gen-date:
name: Update ci_last_modified_date
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 }} [skip ci]"
file_pattern: "_config.yml"
run: "yamllint -f github -d '{extends: default, rules: {line-length: disable}}' _data/guides.yml"
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
Expand All @@ -16,7 +15,7 @@ on:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
contents: read
pages: write
id-token: write

Expand All @@ -26,9 +25,9 @@ concurrency:
cancel-in-progress: true

jobs:

# Build job
build:
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]')) }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -55,6 +54,7 @@ jobs:

# Deployment job
deploy:
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]')) }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,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-12-05"
ci_last_modified_date: "2025-12-10"
16 changes: 14 additions & 2 deletions _layouts/minimal_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title }}</title>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<style>
:root {
/* Maximum number of cards to display per row on wider screens */
Expand Down Expand Up @@ -411,6 +412,16 @@
max-height: none;
}

.guides-description a {
color: #0066cc;
text-decoration: underline;
}

.guides-description a:hover {
color: #004499;
text-decoration: underline;
}

.read-more-btn {
background: none;
border: none;
Expand Down Expand Up @@ -768,7 +779,7 @@
</a>
<h1><a href="{{ '/' | relative_url }}">📚 Learn@MDL</a></h1>
<p>Browse and discover tutorials and workshops from the Map & Data Library, University of Toronto.</p>
<p style="color: rgba(255,255,255,0.8); font-size: 0.9rem; margin-top: 10px;">Last updated: {{ site.ci_last_modified_date | default: "N/A" }}</p>
<p style="color: rgba(255,255,255,0.8); font-size: 0.9rem; margin-top: 10px;">Last updated: {{ site.time | date: "%Y-%m-%d" | default: "N/A" }}</p>
</header>

<div class="sticky-search-wrapper">
Expand Down Expand Up @@ -1205,11 +1216,12 @@ <h3>No guides found</h3>

// Safely handle description
const description = guide.description && guide.description !== 'undefined' && guide.description !== 'null' ? guide.description : '';
const descriptionHtml = description ? marked.parse(description) : '';

return `
<div class="guides-card">
<h3><a href="${guide.url}" target="_blank">${guide.title}</a></h3>
<p class="guides-description" id="${uniqueId}" data-full-text="${description.replace(/"/g, '&quot;')}">${description}</p>
<div class="guides-description" id="${uniqueId}" data-full-text="${description.replace(/"/g, '&quot;')}">${descriptionHtml}</div>
<button class="read-more-btn" id="btn-${uniqueId}" onclick="toggleDescription('${uniqueId}', this)" style="display: none;">Read more</button>
<div class="guides-tags">
${techniques.map(cat => `<span class="tag technique${activeFilters.technique.has(cat) ? ' active' : ''}" data-facet="technique" data-value="${cat}">${cat}</span>`).join('')}
Expand Down
2 changes: 1 addition & 1 deletion docs/update-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Each tutorial entry can have the following fields:
|----------------|------------|----------------------------------------------------------------------------------------------------------------|-----------------------------|
| `id` | No | A unique identifier for the tutorial. | String |
| `title` | Yes | The title of the tutorial. | String |
| `description` | No | A brief description of the tutorial. | String |
| `description` | No | A brief description of the tutorial. <br><br>**Note**: Markdown is supported when rendering this field in the web interface. | String |
| `url` | Yes | The URL of the tutorial. | String (URL) |
| `technique` | No | The technique(s) covered in the tutorial. | String or Array of Strings |
| `tool` | No | The tool(s) used in the tutorial. | String or Array of Strings |
Expand Down