Skip to content

Commit 11c96c9

Browse files
committed
Replace old website by temporary one
1 parent adf17bc commit 11c96c9

484 files changed

Lines changed: 5020 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eleventy.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
const yaml = require("js-yaml");
2+
3+
module.exports = function(eleventyConfig) {
4+
// Enable YAML data files (.yaml)
5+
eleventyConfig.addDataExtension("yaml", (contents) => yaml.load(contents));
6+
7+
eleventyConfig.addPassthroughCopy("assets");
8+
9+
// Filter: limit array length
10+
eleventyConfig.addFilter("limit", (arr, limit) =>
11+
Array.isArray(arr) ? arr.slice(0, limit) : []
12+
);
13+
14+
// Filter: sort by date field descending
15+
eleventyConfig.addFilter("sortByDate", (arr) => {
16+
if (!Array.isArray(arr)) return [];
17+
return [...arr].sort((a, b) => new Date(b.date) - new Date(a.date));
18+
});
19+
20+
// Filter: filter active projects
21+
eleventyConfig.addFilter("active", (arr) => {
22+
if (!Array.isArray(arr)) return [];
23+
return arr.filter(p => p.active !== false);
24+
});
25+
26+
// Filter: filter featured projects
27+
eleventyConfig.addFilter("featured", (arr) => {
28+
if (!Array.isArray(arr)) return [];
29+
return arr.filter(p => p.featured === true);
30+
});
31+
32+
// Filter: people collection entries with a given role, sorted by `order` then name
33+
eleventyConfig.addFilter("byRole", (coll, role) => {
34+
return (coll || [])
35+
.filter(p => p.data.role === role)
36+
.sort((a, b) =>
37+
((a.data.order ?? 99) - (b.data.order ?? 99)) ||
38+
a.data.name.localeCompare(b.data.name)
39+
);
40+
});
41+
42+
// Shortcode: current year (footer copyright)
43+
eleventyConfig.addShortcode("year", () => String(new Date().getFullYear()));
44+
45+
// Filter: "Jana Pavlasek" -> "JP" (photo placeholder)
46+
eleventyConfig.addFilter("initials", (name) => {
47+
return (name || "").split(/\s+/).map(w => w[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
48+
});
49+
50+
return {
51+
// GitHub Pages project sites live under /<repo>/ — the deploy workflow
52+
// sets PATH_PREFIX; locally it defaults to "/".
53+
pathPrefix: process.env.PATH_PREFIX || "/",
54+
dir: {
55+
input: "src",
56+
includes: "../_includes",
57+
data: "../_data",
58+
output: "_site"
59+
},
60+
templateFormats: ["njk", "html", "md"],
61+
htmlTemplateEngine: "njk",
62+
markdownTemplateEngine: "njk"
63+
};
64+
};

.eleventyignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/people/_TEMPLATE.md

.github/workflows/deploy.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
# The publications bot pushes with GITHUB_TOKEN, which does NOT trigger the
8+
# `push` event above. This re-runs the deploy after that workflow finishes.
9+
workflow_run:
10+
workflows: ["Update Publications from ORCID"]
11+
types: [completed]
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
env:
26+
# Auto-derives "/REPO/" so a project page (user.github.io/REPO/) works
27+
# and survives repo renames. If you move to a custom domain (mistlab.ca)
28+
# or a <user/org>.github.io root page, hardcode this to "/" instead.
29+
PATH_PREFIX: "/${{ github.event.repository.name }}/"
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version: "20"
36+
cache: "npm"
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Build Eleventy site
42+
run: npx @11ty/eleventy
43+
44+
- uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: "_site"
47+
48+
deploy:
49+
needs: build
50+
runs-on: ubuntu-latest
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
steps:
55+
- id: deployment
56+
uses: actions/deploy-pages@v4
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Update Publications from ORCID
2+
3+
on:
4+
schedule:
5+
- cron: "0 3 * * 1" # Every Monday at 03:00 UTC
6+
workflow_dispatch: # Allow manual trigger from GitHub Actions UI
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
fetch-publications:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: "20"
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Fetch publications from ORCID public API
25+
run: node scripts/fetch-publications.js
26+
27+
- name: Commit updated publications if changed
28+
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "github-actions[bot]@users.noreply.github.com"
31+
git add _data/publications.json
32+
if git diff --staged --quiet; then
33+
echo "No changes to publications.json"
34+
else
35+
git commit -m "chore: update publications from ORCID"
36+
git push
37+
fi

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
_site/
3+
.DS_Store
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)