Skip to content

Commit a08e2c9

Browse files
committed
Deploy preview for PR 63 🛫
1 parent 9da5861 commit a08e2c9

292 files changed

Lines changed: 72111 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.

‎preview/pr-63/2019/01/07/example-post-1.html‎

Lines changed: 731 additions & 0 deletions
Large diffs are not rendered by default.

‎preview/pr-63/2021/09/30/example-post-2.html‎

Lines changed: 716 additions & 0 deletions
Large diffs are not rendered by default.

‎preview/pr-63/2023/02/23/example-post-3.html‎

Lines changed: 727 additions & 0 deletions
Large diffs are not rendered by default.

‎preview/pr-63/404.html‎

Lines changed: 634 additions & 0 deletions
Large diffs are not rendered by default.

‎preview/pr-63/CHANGELOG.md‎

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
# Changelog
2+
3+
Reference: common-changelog.org
4+
5+
## 1.3.7 - 2025-07-31
6+
7+
### Changed
8+
9+
- Improve cleanup of PR preview folders in gh-pages branch.
10+
- Only run debug dump in debug mode to speed up workflow runs.
11+
12+
## 1.3.6 - 2025-07-30
13+
14+
### Changed
15+
16+
- Improve behavior and flexibility of ORCID cite plugin.
17+
18+
## 1.3.5 - 2025-05-12
19+
20+
### Changed
21+
22+
- Fix workflow bug where PR previews on GitHub Actions have broken styles/links/etc.
23+
- Fix tags component relative link bug.
24+
- Make Actions workflows a bit more robust.
25+
26+
## 1.3.4 - 2025-02-03
27+
28+
### Changed
29+
30+
- Fix section component parsing bug.
31+
32+
## 1.3.3 - 2025-01-25
33+
34+
### Changed
35+
36+
- Citation process logging enhancements.
37+
38+
### Added
39+
40+
- Add support for multiple authors in blog posts.
41+
- Add GitHub Actions workflow status badges to readme.
42+
43+
## 1.3.2 - 2025-01-06
44+
45+
### Changed
46+
47+
- Misc enhancements and bug fixes.
48+
49+
## 1.3.1 - 2024-11-11
50+
51+
### Changed
52+
53+
- Update and improve workflows for building site and citations.
54+
- Escape user inputs better in rare edge cases.
55+
56+
## 1.3.0 - 2024-08-16
57+
58+
### Changed
59+
60+
- List component `filters` parameter changed to `filter` and now takes any Ruby expression instead of the existing custom syntax.
61+
Example: `filters="publisher: bioRxiv, date: ^2020"` becomes `filter="publisher == 'bioRxiv' and date =~ /^2020/"`.
62+
See docs for more info.
63+
- Fix rare bug where data (e.g. a paper title) containing certain characters (e.g. a double quote) can mess up HTML rendering.
64+
- Fix "first time setup" workflow bug.
65+
- Tweak GitHub Actions debugging/logging.
66+
67+
### Added
68+
69+
- Styling for `<details>` HTML element.
70+
71+
## 1.2.2 - 2024-06-05
72+
73+
### Added
74+
75+
- Add `affiliation` member portrait field.
76+
77+
### Changed
78+
79+
- Change order and type of preferred ids from ORCID API.
80+
- Expand list of supported Manubot identifiers and thus keep ORCID API details less often.
81+
- Simplify portrait component under-the-hood.
82+
- Make tag component de-duplication consistent with search plugin de-duplication.
83+
84+
## 1.2.1 - 2024-04-01
85+
86+
### Changed
87+
88+
- Minor bug fixes in cite process and sitemap generation.
89+
90+
## 1.2.0 - 2024-03-08
91+
92+
### Changed
93+
94+
- Update all GitHub Actions to fix "Node v16 deprecated" warnings.
95+
- Sources that Manubot doesn't know how to cite (e.g. wosuid:12345) are now ignored by default if they're from metasources.
96+
- Fix bug where passing tags to tags component manually doesn't work.
97+
- Fix bug in citation (and other) components when `lookup` is blank.
98+
- Fix nested tables bug.
99+
- Dark mode tweaks.
100+
- Various CSS tweaks and fixes.
101+
102+
### Added
103+
104+
- Add `image` param to support blog post thumbnails.
105+
- Add `html-proofer` plugin that checks for broken images/links/etc.
106+
- Add `remove` flag to remove a source from a metasource.
107+
108+
## 1.1.6 - 2023-10-06
109+
110+
### Changed
111+
112+
- Use latest minor versions of Python packages in auto-cite script.
113+
114+
## 1.1.5 - 2023-05-19
115+
116+
### Changed
117+
118+
- Fix ORCID plugin bug and other cite process tweaks.
119+
120+
## 1.1.4 - 2023-04-28
121+
122+
### Changed
123+
124+
- Fix ORCID plugin and other cite process bugs.
125+
126+
## 1.1.3 - 2023-04-20
127+
128+
### Changed
129+
130+
- Fix first-time-setup mv bug.
131+
- Fix citation, float, and portrait component CSS.
132+
- Filter and trim citation info fields.
133+
134+
## 1.1.2 - 2023-04-11
135+
136+
### Changed
137+
138+
- Fix first-time-setup rm bug.
139+
140+
## 1.1.1 - 2023-04-06
141+
142+
### Changed
143+
144+
- Change member profile page from col layout to float.
145+
- Fix first time setup. Preserve config formatting and comments.
146+
- Improve Docker cite process behavior.
147+
- Fix post excerpt component start/end markers and special search attr chars.
148+
- Fix misc CSS.
149+
150+
### Added
151+
152+
- Add show-title and show-subtitle site config options.
153+
- Include site subtitle in description meta tag.
154+
- Add user pull request template.
155+
- Add title and link fallbacks to citation component.
156+
157+
## 1.1.0 - 2023-03-17
158+
159+
Add alert component, Docker support, accessibility fixes.
160+
161+
### Changed
162+
163+
- Fix Lighthouse accessibility issues.
164+
- De-href components when link isn't provided (no hand cursor icon on hover or nav on click).
165+
- In search script, limit highlights by total count instead of char length.
166+
- Grid and link style tweaks.
167+
- Take ORCID icon from Font Awesome.
168+
- Misc bug fixes in tags script, float component.
169+
170+
### Added
171+
172+
- Add Docker configuration and scripts for local previewing.
173+
- Add alert component and types.
174+
- Role icon in portrait component hoisted to top left.
175+
176+
## 1.0.0 - 2023-02-28
177+
178+
First official release.
179+
180+
High-level comparison with pre-releases:
181+
182+
- Simpler configuration.
183+
- More automation, less setup.
184+
- More customization and flexibility.
185+
- Redesigned components.
186+
- New docs.
187+
- Complete rewrite.
188+
- Culmination of years of feedback.
189+
190+
### Changed
191+
192+
- Template is no longer limited to GitHub Pages white-listed Jekyll plugins. Any plugins possible.
193+
- Pull request previews happen right within GitHub instead of needing Netlify.
194+
- Better versioning. `CITATION.cff` file now source of truth for version, and tags/releases enforced.
195+
- Citation-related files in `/_data` must now be named prefixed with the cite plugin they are to be run with, e.g. `sources-2020.yaml` or `orcid-students.yaml`.
196+
- Folder renames for clarity and for better separation of template and user content: `/auto-cite` → `/_cite`, `/css` → `/_styles`, `/js` → `/_scripts`.
197+
- Rename "Tools" page to "Projects" to be more clear and general purpose.
198+
- Rename `extra-links` to `buttons` in `sources.yaml` files.
199+
- Rename `theme.scss` to `-theme.scss`.
200+
- Rename/repurpose components: link → button, two-col → cols, gallery → grid.
201+
- Combine "link" and "role" data lists into single `types.yaml` map.
202+
- Redesign components, change parameters and behavior.
203+
- Update Font Awesome icon names from v5 to v6.
204+
- Change placeholder text, images, and other images.
205+
- Use CSS variables instead of Sass variables.
206+
- Simplify caching method in cite process.
207+
- Simplify Liquid code by including custom Ruby plugins.
208+
- Simplify styles and scripts.
209+
210+
### Added
211+
212+
- New docs at greene-lab.gitbook.io/lab-website-template-docs.
213+
- Add automations for first time setup and URL change.
214+
- Write PubMed and Google Scholar automatic citation plugins.
215+
- Automatic citations through GitHub Actions should now work from (most) forks.
216+
- Add optional description and type params for citations.
217+
- Add periodic cite process run that opens a pull request.
218+
- List component filters can now accept arbitrary regex.
219+
- Add light/dark mode toggle.
220+
- Pre-install selection of useful Jekyll plugins, namely Jekyll Spaceship.
221+
- Add author portrait and updated date for blog posts.
222+
- Add richer metadata for SEO.
223+
- Google Fonts link determined automatically from theme file.
224+
225+
### Removed
226+
227+
- Remove options from `_config.yaml` to simplify configuration: `baseurl`, `auto-cite`, `logo`.
228+
- Remove `/favicons` folder, hardcode files for logo, icon, and share in `/images`.
229+
- Remove `palettes.scss` and `mixins.scss`.
230+
- Remove banner component (same thing can be achieved with full width section and figure components).
231+
- Remove role component. Combine with portrait component.

‎preview/pr-63/CNAME‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
www.ncilab.ca
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
creates link next to each heading that links to that section.
3+
*/
4+
5+
{
6+
const onLoad = () => {
7+
// for each heading
8+
const headings = document.querySelectorAll(
9+
"h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]"
10+
);
11+
for (const heading of headings) {
12+
// create anchor link
13+
const link = document.createElement("a");
14+
link.classList.add("icon", "fa-solid", "fa-link", "anchor");
15+
link.href = "#" + heading.id;
16+
link.setAttribute("aria-label", "link to this section");
17+
heading.append(link);
18+
19+
// if first heading in the section, move id to parent section
20+
if (heading.matches("section > :first-child")) {
21+
heading.parentElement.id = heading.id;
22+
heading.removeAttribute("id");
23+
}
24+
}
25+
};
26+
27+
// scroll to target of url hash
28+
const scrollToTarget = () => {
29+
const id = window.location.hash.replace("#", "");
30+
const target = document.getElementById(id);
31+
32+
if (!target) return;
33+
const offset = document.querySelector("header").clientHeight || 0;
34+
window.scrollTo({
35+
top: target.getBoundingClientRect().top + window.scrollY - offset,
36+
behavior: "smooth",
37+
});
38+
};
39+
40+
// after page loads
41+
window.addEventListener("load", onLoad);
42+
window.addEventListener("load", scrollToTarget);
43+
window.addEventListener("tagsfetched", scrollToTarget);
44+
45+
// when hash nav happens
46+
window.addEventListener("hashchange", scrollToTarget);
47+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
manages light/dark mode.
3+
*/
4+
5+
{
6+
// immediately load saved (or default) mode before page renders
7+
document.documentElement.dataset.dark =
8+
window.localStorage.getItem("dark-mode") ?? "false";
9+
10+
const onLoad = () => {
11+
// update toggle button to match loaded mode
12+
document.querySelector(".dark-toggle").checked =
13+
document.documentElement.dataset.dark === "true";
14+
};
15+
16+
// after page loads
17+
window.addEventListener("load", onLoad);
18+
19+
// when user toggles mode button
20+
window.onDarkToggleChange = (event) => {
21+
const value = event.target.checked;
22+
document.documentElement.dataset.dark = value;
23+
window.localStorage.setItem("dark-mode", value);
24+
};
25+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
fetches tags (aka "topics") from a given GitHub repo and adds them to row of
3+
tag buttons. specify repo in data-repo attribute on row.
4+
*/
5+
6+
{
7+
const onLoad = async () => {
8+
// get tag rows with specified repos
9+
const rows = document.querySelectorAll("[data-repo]");
10+
11+
// for each repo
12+
for (const row of rows) {
13+
// get props from tag row
14+
const repo = row.dataset.repo.trim();
15+
const link = row.dataset.link.trim();
16+
17+
// get tags from github
18+
if (!repo) continue;
19+
let tags = await fetchTags(repo);
20+
21+
// filter out tags already present in row
22+
let existing = [...row.querySelectorAll(".tag")].map((tag) =>
23+
window.normalizeTag(tag.innerText)
24+
);
25+
tags = tags.filter((tag) => !existing.includes(normalizeTag(tag)));
26+
27+
// add tags to row
28+
for (const tag of tags) {
29+
const a = document.createElement("a");
30+
a.classList.add("tag");
31+
a.innerHTML = tag;
32+
a.href = `${link}?search="tag: ${tag}"`;
33+
a.dataset.tooltip = `Show items with the tag "${tag}"`;
34+
row.append(a);
35+
}
36+
37+
// delete tags container if empty
38+
if (!row.innerText.trim()) row.remove();
39+
}
40+
41+
// emit "tags done" event for other scripts to listen for
42+
window.dispatchEvent(new Event("tagsfetched"));
43+
};
44+
45+
// after page loads
46+
window.addEventListener("load", onLoad);
47+
48+
// GitHub topics endpoint
49+
const api = "https://api.github.com/repos/REPO/topics";
50+
const headers = new Headers();
51+
headers.set("Accept", "application/vnd.github+json");
52+
53+
// get tags from GitHub based on repo name
54+
const fetchTags = async (repo) => {
55+
const url = api.replace("REPO", repo);
56+
try {
57+
const response = await (await fetch(url)).json();
58+
if (response.names) return response.names;
59+
else throw new Error(JSON.stringify(response));
60+
} catch (error) {
61+
console.groupCollapsed("GitHub fetch tags error");
62+
console.log(error);
63+
console.groupEnd();
64+
return [];
65+
}
66+
};
67+
}

0 commit comments

Comments
 (0)