From 6802f3479051a42934ab4a5d824796824551677f Mon Sep 17 00:00:00 2001 From: Jan N Rose Date: Sun, 7 Jun 2026 15:32:10 +0200 Subject: [PATCH 1/2] Clean up dev setup --- .gitignore | 1 - .vscode/settings.json | 9 ++++++ README.md | 3 +- _config.yml | 1 + scripts/pages-serve | 70 +++++++++++++++++++++---------------------- 5 files changed, 46 insertions(+), 38 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index badbc02..ca35be0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ _site -.sass-cache diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7e02342 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "files.exclude": { + "_site": true + }, + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "*": "${capture}.lock" + } +} \ No newline at end of file diff --git a/README.md b/README.md index 8031dbe..4b21683 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ make build make serve ``` -This will rebuild the site, then serves `_site` at `http://localhost:4000`. +This will start Jekyll in watch mode and serve the site at +`http://localhost:4000`. Content changes are rebuilt automatically. Useful overrides: diff --git a/_config.yml b/_config.yml index 8bef2b3..0c257a0 100644 --- a/_config.yml +++ b/_config.yml @@ -18,6 +18,7 @@ url: https://cmrcs.org markdown: kramdown theme: minima +# Files to not copy to _site/ (dotfiles are excluded by default) exclude: - Gemfile - Gemfile.lock diff --git a/scripts/pages-serve b/scripts/pages-serve index 63c861f..68ecdd2 100755 --- a/scripts/pages-serve +++ b/scripts/pages-serve @@ -16,55 +16,53 @@ if ! command -v docker >/dev/null 2>&1; then fi rm -rf "${repo_root}/${destination_dir#./}" -config_path="${repo_root}/${source_dir#./}/_config.yml" -config_backup="$(mktemp)" -if [ ! -f "${config_path}" ]; then - echo "Cannot find Jekyll config at ${config_path}" >&2 +if [ ! -f "${repo_root}/${source_dir#./}/_config.yml" ]; then + echo "Cannot find Jekyll config at ${repo_root}/${source_dir#./}/_config.yml" >&2 exit 1 fi -cp "${config_path}" "${config_backup}" - -cleanup() { - cp "${config_backup}" "${config_path}" - rm -f "${config_backup}" -} - -trap cleanup EXIT - -{ - echo - printf 'baseurl: "%s"\n' "${local_baseurl}" -} >> "${config_path}" - docker run --rm \ --platform "${platform}" \ + --publish "${port}:${port}" \ --volume "${repo_root}:/github/workspace" \ --workdir /github/workspace \ --env GITHUB_WORKSPACE=/github/workspace \ --env GITHUB_REPOSITORY="${GITHUB_REPOSITORY:-CMRCS/cmrcs.github.io}" \ --env GITHUB_API_URL="${GITHUB_API_URL:-https://api.github.com}" \ - --env INPUT_SOURCE="${source_dir}" \ - --env INPUT_DESTINATION="${destination_dir}" \ - --env INPUT_FUTURE="${PAGES_FUTURE:-false}" \ - --env INPUT_BUILD_REVISION="${build_revision}" \ - --env INPUT_VERBOSE="${PAGES_VERBOSE:-true}" \ - --env INPUT_TOKEN="${GITHUB_TOKEN:-}" \ + --env JEKYLL_GITHUB_TOKEN="${GITHUB_TOKEN:-}" \ + --env JEKYLL_BUILD_REVISION="${build_revision}" \ + --env PAGES_REPO_NWO="${GITHUB_REPOSITORY:-CMRCS/cmrcs.github.io}" \ + --env PAGES_API_URL="${GITHUB_API_URL:-https://api.github.com}" \ + --env PAGES_PORT="${port}" \ + --env PAGES_SOURCE="${source_dir}" \ + --env PAGES_DESTINATION="${destination_dir}" \ + --env PAGES_LOCAL_BASEURL="${local_baseurl}" \ + --env PAGES_FUTURE="${PAGES_FUTURE:-false}" \ + --env PAGES_VERBOSE="${PAGES_VERBOSE:-true}" \ + --env JEKYLL_ENV=development \ --entrypoint bash \ "${image}" \ -lc ' - /entrypoint.sh - ' + set -euo pipefail -cleanup -trap - EXIT + cd /usr/local/bundle -docker run --rm \ - --platform "${platform}" \ - --publish "${port}:${port}" \ - --volume "${repo_root}:/github/workspace" \ - --workdir /github/workspace \ - --entrypoint ruby \ - "${image}" \ - -run -e httpd "${destination_dir#./}" -p "${port}" -b 0.0.0.0 + args=() + if [ "${PAGES_VERBOSE:-true}" = "true" ]; then + args+=(--verbose) + fi + if [ "${PAGES_FUTURE:-false}" = "true" ]; then + args+=(--future) + fi + + bundle exec jekyll serve \ + "${args[@]}" \ + --host 0.0.0.0 \ + --port "${PAGES_PORT:-4000}" \ + --source "${GITHUB_WORKSPACE}/${PAGES_SOURCE:-./}" \ + --destination "${GITHUB_WORKSPACE}/${PAGES_DESTINATION:-./_site}" \ + --baseurl "${PAGES_LOCAL_BASEURL:-}" \ + --watch \ + --force_polling + ' From e5cb524d26c308434cb7f60624bf3c58830003a6 Mon Sep 17 00:00:00 2001 From: Jan N Rose Date: Sun, 7 Jun 2026 16:24:19 +0200 Subject: [PATCH 2/2] Add people and publications --- _data/people.yml | 27 ++ _data/publications.yml | 11 + _layouts/people_index.html | 24 ++ _layouts/person.html | 64 +++++ _layouts/publication.html | 36 +++ _layouts/publications_index.html | 32 +++ _layouts/site.html | 1 + assets/css/pages.css | 262 ++++++++++++++++++ people/andrew-scott.md | 6 + people/denis-doorly.md | 6 + people/index.md | 4 + people/jan-rose.md | 10 + publications/index.md | 4 + ...-insights-dt-cmr-virtual-microstructure.md | 12 + 14 files changed, 499 insertions(+) create mode 100644 _data/people.yml create mode 100644 _data/publications.yml create mode 100644 _layouts/people_index.html create mode 100644 _layouts/person.html create mode 100644 _layouts/publication.html create mode 100644 _layouts/publications_index.html create mode 100644 assets/css/pages.css create mode 100644 people/andrew-scott.md create mode 100644 people/denis-doorly.md create mode 100644 people/index.md create mode 100644 people/jan-rose.md create mode 100644 publications/index.md create mode 100644 publications/novel-insights-dt-cmr-virtual-microstructure.md diff --git a/_data/people.yml b/_data/people.yml new file mode 100644 index 0000000..74e6ac9 --- /dev/null +++ b/_data/people.yml @@ -0,0 +1,27 @@ +- id: andrew-scott + name: Andrew D. Scott + image: + summary: + role: + focus: + orcid: 0000-0001-7656-3123 + linkedin: scottandrewd + webpage: https://profiles.imperial.ac.uk/andrew.scott +- id: denis-doorly + name: Denis J. Doorly + image: + summary: + role: + focus: + orcid: Orcid identifier0000-0002-5372-4702 + linkedin: + webpage: https://profiles.imperial.ac.uk/d.doorly +- id: jan-rose + name: Jan N. Rose + image: + summary: Completed his PhD in 2021, working on realistic histology-based DT-CMR simulation using Monte Carlo methods. + role: Alumn + focus: Cardiac microstructure, Monte Carlo modelling + orcid: 0000-0002-2273-7439 + linkedin: janniklasrose + github: janniklasrose diff --git a/_data/publications.yml b/_data/publications.yml new file mode 100644 index 0000000..7bc7e97 --- /dev/null +++ b/_data/publications.yml @@ -0,0 +1,11 @@ +- id: novel-insights-dt-cmr-virtual-microstructure + year: 2019 + title: Novel insights into in-vivo diffusion tensor cardiovascular magnetic resonance using computational modeling and a histology-based virtual microstructure + doi: 10.1002/mrm.27561 + authors: + - person: jan-rose + - name: Sonia Nielles-Vallespin + - name: Pedro F. Ferreira + - name: David N. Firmin + - person: andrew-scott + - person: denis-doorly diff --git a/_layouts/people_index.html b/_layouts/people_index.html new file mode 100644 index 0000000..0f87ac7 --- /dev/null +++ b/_layouts/people_index.html @@ -0,0 +1,24 @@ +--- +layout: site +--- + +
+
+

{{ page.title }}

+
{{ content }}
+
+ +
+ {% for person in site.data.people %} +
+ Profile image for {{ person.name }} +
+

{{ person.role }}

+

{{ person.name }}

+

{{ person.summary }}

+ View profile +
+
+ {% endfor %} +
+
diff --git a/_layouts/person.html b/_layouts/person.html new file mode 100644 index 0000000..24eb9a8 --- /dev/null +++ b/_layouts/person.html @@ -0,0 +1,64 @@ +--- +layout: site +--- +{% assign person = site.data.people | where: "id", page.person_id | first %} + +
+
+

{{ person.name }}

+
+
+ +
+ {{ content }} +

Publications

+ {% assign authored_publications = "" | split: "" %} + {% for publication in site.data.publications %} + {% for author in publication.authors %} + {% if author.person == person.id %} + {% assign authored_publications = authored_publications | push: publication %} + {% endif %} + {% endfor %} + {% endfor %} + {% if authored_publications.size > 0 %} +
    + {% for publication in authored_publications %} +
  • + {{ publication.title }} + {{ publication.year }} +
  • + {% endfor %} +
+ {% else %} +

No publications listed yet.

+ {% endif %} +
+
+
diff --git a/_layouts/publication.html b/_layouts/publication.html new file mode 100644 index 0000000..d81e80e --- /dev/null +++ b/_layouts/publication.html @@ -0,0 +1,36 @@ +--- +layout: site +--- +{% assign publication = site.data.publications | where: "id", page.publication_id | first %} + +
+
+

{{ publication.title }}

+
+
+ +
+ {{ content }} +
+
+
diff --git a/_layouts/publications_index.html b/_layouts/publications_index.html new file mode 100644 index 0000000..b4434b3 --- /dev/null +++ b/_layouts/publications_index.html @@ -0,0 +1,32 @@ +--- +layout: site +--- + +
+
+

{{ page.title }}

+
{{ content }}
+
+ +
+ {% for publication in site.data.publications %} +
+
+

{{ publication.title }}

+

+ {% for author in publication.authors %} + {% if author.person %} + {% assign person = site.data.people | where: "id", author.person | first %} + {{ person.name }}{% unless forloop.last %}, {% endunless %} + {% else %} + {{ author.name }}{% unless forloop.last %}, {% endunless %} + {% endif %} + {% endfor %} +

+ Read publication page +
+
{{ publication.year }}
+
+ {% endfor %} +
+
diff --git a/_layouts/site.html b/_layouts/site.html index 330957a..b42e2e3 100644 --- a/_layouts/site.html +++ b/_layouts/site.html @@ -6,6 +6,7 @@ {{ page.title }} | {{ site.title }} +