Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/data-processing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# Checkout the repository code to the runner environment
with:
# Full history: the generators read per-file commit dates to bootstrap
# `lastmod`, which a shallow clone would report as HEAD for every file.
# `lastmod` and artifact freshness; shallow clones report HEAD for every file.
fetch-depth: 0

#======================
Expand Down Expand Up @@ -497,12 +497,16 @@ jobs:
#========================================
# Upload all processed data files as artifact
#========================================
- name: Record per-file data freshness
run: python3 scripts/data_artifact.py manifest

- name: Upload data artifact
id: upload-artifact
uses: actions/upload-artifact@v7
with:
name: data-artifact
path: |
data-artifact-manifest.json
content/contributors/tenzing.md
scripts/forrt_contribs/contributors_cache.csv
content/curated_resources/
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/staging-aggregate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,17 @@ jobs:
with:
workflow: data-processing.yml
name: data-artifact
path: .
path: .staging-data-artifact
github_token: ${{ secrets.GITHUB_TOKEN }}
search_artifacts: true
if_no_artifact_found: warn

- name: Select newer committed or artifact data
if: steps.download-artifact.outcome == 'success'
run: |
python3 scripts/data_artifact.py overlay .staging-data-artifact
rm -rf .staging-data-artifact

# =======================
# Data Processing (Fallback)
# =======================
Expand Down Expand Up @@ -379,10 +385,16 @@ jobs:
with:
workflow: data-processing.yml
name: data-artifact
path: .
path: .staging-data-artifact
github_token: ${{ secrets.GITHUB_TOKEN }}
run_id: ${{ steps.data-processing.outputs.run_id }}

- name: Select newer data after artifact retry
if: steps.download-artifact-retry.outcome == 'success'
run: |
python3 scripts/data_artifact.py overlay .staging-data-artifact
rm -rf .staging-data-artifact

- name: Run data processing if needed
if: steps.download-artifact.outcome == 'failure' && steps.data-processing.outputs.data_processing_triggered != 'true'
env:
Expand Down
113 changes: 113 additions & 0 deletions assets/scss/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,24 @@
color: inherit;
font-family: inherit;
}
.acc-leads {
flex: 0 1 auto;
max-width: 42%;
padding: 0.12rem 0.4rem;
border-left: 2px solid rgba(0,0,0,0.12);
color: rgba(0,0,0,0.52);
font-size: 0.62rem;
font-weight: 400;
line-height: 1.3;
}
.acc-leads__label {
color: rgba(0,0,0,0.66);
font-weight: 600;
}
.acc-leads p {
display: inline;
margin: 0;
}
.acc-count {
margin-left: auto;
font-size: 0.55rem;
Expand Down Expand Up @@ -1568,6 +1586,96 @@ article.article:has(table) .article-container {
display: inline-block;
}

/* Partner logo beside the disciplines intro (plain image, no lightbox) */
.disciplines-partner {
text-align: center;
max-width: 220px;
/* Sit beside the opening paragraph rather than centred against the whole column. */
align-self: flex-start;
margin-top: 1rem;
}

.disciplines-partner img {
width: 160px;
height: auto;
}

.disciplines-partner__caption {
font-size: 0.8rem;
color: #666;
margin-bottom: 0.4rem;
white-space: nowrap;
}

/* Lead-in label in front of each citation in the disciplines "How to cite" box */
.disciplines-cite-lead {
display: block;
font-weight: 600;
font-size: 0.82rem;
margin-bottom: 0.2rem;
}

/* Keep citation guidance discoverable without letting a growing author list
* dominate the page. The native details element is collapsed by default. */
.disciplines-attribution {
margin: 0 0 1.25rem;
}

.disciplines-citation-summary {
cursor: pointer;
color: #b3005a;
font-size: 1.05rem;
font-weight: 700;
text-align: center;
padding: 0.6rem;
list-style-position: inside;
}

.disciplines-citation-summary:hover,
.disciplines-citation-summary:focus-visible {
color: #8e0048;
text-decoration: underline;
}

.disciplines-attribution[open] .disciplines-citation-summary {
margin-bottom: 0.35rem;
}

.clusters-display-section > .container > .disciplines-attribution {
max-width: 760px;
margin: 1.5rem auto 0;
}

/* Discipline / field leads, shown on the coloured field background */
.disciplines-leads {
font-size: 0.9rem;
margin: 0 0 0.55rem;
}

.disciplines-leads p {
margin: 0;
display: inline;
}

.disciplines-leads__label {
font-weight: 600;
}

@media (max-width: 600px) {
.acc-header {
flex-wrap: wrap;
}

.acc-leads {
flex-basis: 100%;
max-width: none;
margin-left: 1rem;
padding-top: 0;
padding-bottom: 0.1rem;
border-left: 0;
}
}

.update-pending-badge {
position: absolute;
bottom: 0.5rem;
Expand Down Expand Up @@ -1660,6 +1768,11 @@ article.article:has(table) .article-container {
max-width: 260px;
}

.disciplines-partner {
align-self: center;
margin-top: 0;
}

.intro-paragraph {
font-size: 0.9rem;
}
Expand Down
72 changes: 64 additions & 8 deletions content/disciplines/README
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,29 @@ Three tabs, all with header rows:

**Fields** — top-level groupings, in display order

| Name | Summary | Show |
| --- | --- | --- |
| Natural Sciences | _(optional one-paragraph intro)_ | TRUE |
| … | | |
| Name | Summary | Show | Leads |
| --- | --- | --- | --- |
| Natural Sciences | _(optional one-paragraph intro)_ | TRUE | `[Jane Doe](https://orcid.org/0000-0002-1825-0097) (University X)` |
| … | | | |

- `Show` controls visibility on the page. `TRUE` / `YES` / `1` (or empty) shows the field;
`FALSE` hides it. Hidden fields stay in the sheet for future use.
- `Leads` is optional free text, markdown allowed. It renders under the field
summary as "Field lead(s):". Separate several people with commas — the label
is pluralised when the cell contains a comma.

**Disciplines** — disciplines within each field

| Field | Discipline | Examples |
| --- | --- | --- |
| Natural Sciences | Chemistry | _short prose with case-study examples_ |
| Field | Discipline | Examples | Leads |
| --- | --- | --- | --- |
| Natural Sciences | Chemistry | _short prose with case-study examples_ | `[Jane Doe](https://orcid.org/0000-0002-1825-0097) (University X)` |

- The `Field` column must match a `Name` in the Fields tab exactly.
- `Examples` is plain prose shown under the discipline heading.
- `Leads` is optional free text, markdown allowed. It renders at the top of the
opened discipline as "Discipline lead(s):", with the same comma rule as above.

`Show` and `Leads` are found by header name, so they can sit in any column.

**Resources** — one row per resource link

Expand Down Expand Up @@ -97,7 +104,9 @@ that mirrors the old Google Doc layout.

After a hackathon refresh, the team produces a new master Google Doc.
`scripts/parse_disciplines_gdoc.py` rewrites the three sheet tabs from
that document — destructive, so back up first if you want a copy.
that document — destructive, so back up first if you want a copy. It clears
every tab before writing, so the `Leads` columns are lost: copy them out
beforehand and paste them back after the push.

```bash
# 1) Get the file id of the G-Doc from Google Drive (URL ends with /d/<ID>/edit)
Expand Down Expand Up @@ -145,6 +154,53 @@ Methodology, etc.

There is no script that maintains this sheet — it is edited by hand.

## Citation

The page carries two citations under "How to cite":

- **The preprint** — hard-coded in `layouts/partials/disciplines/intro.html`.
- **This web resource** — read from `data/disciplines_citation.json`
(`web` is the plain-text form used by the copy button, `web_html` the same
string with the URL as a link).

Regenerate the web citation from the [Tenzing sheet][tenzing]:

```bash
python3 scripts/build_disciplines_citation.py
```

Author order: contributors with a number in the "Order in publication" column
come first, ascending; everyone else follows, alphabetically by surname.

If `data/disciplines_citation.json` is absent, the page shows the preprint
citation only.

## Analytics

Every discipline heading has a shareable link and a copy button next to it.
The links have the form `https://forrt.org/disciplines/#<slug>`, where `<slug>`
is the discipline name in lowercase with non-alphanumeric characters replaced
by hyphens, e.g. `#chemistry`. Links in the earlier `#f<N>-<slug>` form still
resolve.

Opening a discipline sends a GA4 event `discipline_view` with these parameters:

| Parameter | Value |
| --- | --- |
| `discipline` | Discipline name |
| `field` | Field name |
| `anchor` | Anchor id, e.g. `chemistry` |
| `source` | `click` (heading clicked), `sidebar` (sidebar link), or `hash` (page opened on a discipline link) |

Each discipline fires at most once per page load. "Expand all" does not fire
the event. Copying a discipline link sends `discipline_link_copied` with the
`anchor` parameter.

To break these down in GA4 reports, register `discipline` (and, if wanted,
`field`) as event-scoped custom dimensions under Admin → Custom definitions.
Without that registration the events are counted but the parameter values are
not reportable.

## Page mechanics (quick reference)

- The Hugo build reads `data/disciplines.json`. That file is generated by
Expand Down
Binary file added content/disciplines/UKRN.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions content/disciplines/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ sharing_description = "Open research resources and examples across 40 discipline
keywords = [ "open research", "open science disciplines", "FORRT", "open data", "open methods", "open access", "reproducibility", "research transparency", "discipline-specific open science" ]

draft = false
show_leads = false # Set to true when field and discipline leads are ready to display.

[sitemap]
changefreq = "monthly"
Expand Down
Loading
Loading