Skip to content

Commit 07e0126

Browse files
committed
Deploy preview for PR 49 🛫
1 parent 4375749 commit 07e0126

File tree

159 files changed

+29018
-0
lines changed

Some content is hidden

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

159 files changed

+29018
-0
lines changed

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

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

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

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

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

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

‎preview/pr-49/404.html‎

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

‎preview/pr-49/CHANGELOG.md‎

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