About

Source of the website of the Canepa Research Group, caneparesearch.org. The site is built with Jekyll and published through GitHub Pages from the separate repository caneparesearch/caneparesearch.github.io.

Build the site locally

The repository is private: ask Prof. Canepa for access, then clone it and install the dependencies (Ruby 3 and Bundler; the Jekyll version is pinned in the Gemfile):

git clone [email protected]:caneparesearch/source-care-website.git
cd source-care-website
bundle install

Build the site into _site/ with bundle exec jekyll build, or preview it with bundle exec jekyll serve and open http://127.0.0.1:4000/.

A local preview runs in Jekyll’s default “development” environment, which leaves out the upgrade-insecure-requests Content-Security-Policy directive that the real, always-HTTPS site sends (update.sh builds with JEKYLL_ENV=production to turn it back on). If a local preview omits it, that is expected, not a bug — sending it locally would make the browser retry every link over HTTPS against a plain-HTTP server and fail.

Publish

publish.sh commits, pushes and publishes in one step:

./publish.sh "short description of the change" [new-file ...]

It commits the changes to tracked files (brand-new files are only included if you name them, and .jekyll-cache/ never is), pushes the current branch, then runs update.sh with the same message. Add -n for a dry run that shows what it would do, or -y to skip the confirmation. It stops before committing if the remote has commits you do not have.

To publish without committing anything, run update.sh yourself. It needs caneparesearch.github.io checked out next to this repository, the aws CLI with access to the carepapers bucket, and jq:

./update.sh "short description of the change"

It pulls this repository, regenerates the sitemap of the papers in the bucket (update_aws_sitemap.sh), builds the site, dates every URL in sitemap.xml by its last real edit in git (_scripts/generate-sitemap.rb; the plugin only knows the post date or the build date, and commits that touch more than 30 files are ignored as repo-wide sweeps), copies _site/ into caneparesearch.github.io, then commits and pushes there. It does not push this repository, so push your commits separately. It copies files over and never deletes, so remove a page from caneparesearch.github.io by hand if it should disappear from the site.

Content

Every page is a Markdown file with a short YAML header. The date at the start of a post’s file name is its post date.

Section Location Notes
News news/_posts/YYYY-MM-DD-Topic.md layout: post, category: news, title, author (first name of a team member), optional image
Team team/_posts/ layout: member, title, position, image, and optional email, github, scholar, orcid, twitter, cv, calendar; alumni: true for former members
Research research/_posts/ layout: post, title, image
Papers papers/_posts/ layout: paper, title, authors, journal, year, doi, image, and optionally pdf and github

Photos and figures live in images/, in a folder named after the section.

Every page gets a <meta name="description"> for search results: the page’s own description field if it has one, otherwise a post’s first paragraph, otherwise the site tagline in _config.yml, cut to 160 characters. The home page sets its own in index.html; add a description to any other page whose first paragraph makes a poor summary.

Papers

Name a paper and its files <date>-<first-author>-<journal>-<year>, all lowercase, where the journal is the ISO 4 abbreviation with hyphens, for example 2025-01-30-park-nat-mater-2025.md. If the same first author has two papers in the same journal and year, add a and b after the year. The address of a paper is built from this name, so it must be unique.

Team

Name a team post and its image <date>-<name>, all lowercase, matching the person’s title, for example 2020-10-25-aaron-tieu.md and images/team/2020-10-25-aaron-tieu.jpg. The address of a member’s page is built from this name, so it must be unique; sidebar links (E-mail, GitHub, Google Scholar, ORCiD, etc.) are shown alphabetically by label regardless of the order fields appear in the header.

Write a bio in the first person. When a member leaves, set alumni: true, open the bio with a line saying where they are now (“I am now a research scientist at …”), and put finished student or postdoc periods in the past tense; hobbies and current interests stay in the present. On the Team page, current members are listed in reverse chronological order (most recently added first) and alumni alphabetically by name.

If you rename a team page, list its old address under redirect_from: as for papers above — except when the old and new names differ only by letter case (for example fixing capitalization), since that can’t reliably redirect on a case-insensitive filesystem such as macOS’s default disk; leave redirect_from: out in that case.

E-mail addresses

Never write an e-mail address in a page. Use the include instead, which prints “name [at] example.org” and lets js/email-links.js build the mailto link only while a visitor hovers, focuses or taps it, so the address is not in the page source or in the page as loaded:

{% include email-link.html address="[email protected]" %}

The member layout does this for the email field of a team page.

Design

Security

File conventions

.gitattributes and .editorconfig keep every text file in LF line endings, UTF-8 and ending with a newline, as POSIX defines a text file. Let your editor honour them, and do not save files with CRLF endings or without a final newline. The one exception is google736838dc293297e8.html, the Google Search Console verification file, which must stay exactly as Google issued it.

License

All source code in this repository, consisting of files with extensions .html, .css, .scss, .rb or .js, is freely available under an MIT license, unless otherwise noted within a file. You’re welcome to borrow / repurpose code to build your own site.

The MIT License (MIT)

Copyright (c) 2018-present Pieremanuele Canepa with the help of Bedford

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.