Skip to content

add logic to make citations re-usable #717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

rvhonorato
Copy link
Member

@rvhonorato rvhonorato commented Jul 11, 2025

This PR adds a framework to make citations re-usable across the pages.

Currently a lot of things are duplicated in the many different pages, this is not necessary. Given that the website is built with jekyll and uses liquid as the HTML render, you can define either static or dynamic blocks of content and include them in the pages.

In this PR I've added the logic for a citation - granted that this is not something that changes often, but you can apply the same logic to a "haddock_intro.md" and then just include them in the pages instead of copy and paste every time.

How it works

  • _data/publications.yml holds the data for the publication
haddock24:
  authors: "R.V. Honorato, M.E. Trellet, B. Jiménez-García, J.J. Schaarschmidt, M. Giulini, V. Reys, P.I. Koukos, J.P.G.L.M. Rodrigues, E. Karaca, G.C.P. van Zundert, J. Roel-Touris, C.W. van Noort, Z. Jandová, A.S.J. Melquiond and **A.M.J.J. Bonvin**"
  title: "The HADDOCK2.4 web server: A leap forward in integrative modelling of biomolecular complexes"
  url: "https://www.nature.com/articles/s41596-024-01011-0"
  journal: Nature Protoc
  details: "19, 3219–3241"
  doi: "10.1038/s41596-024-01011-0"
  year: 2024
  • _includes/paper_citation.html handles the formatting of the data:
{% assign paper = site.data.papers[include.key] %}
<!-- Define how the citation should be formatted -->
* {{ paper.authors }} [{{ paper.title }}]({{ paper.url }}). _{{ paper.journal
}}_, {{ paper.details }} DOI: [{{ paper.doi }}](https://doi.org/{{ paper.doi }})
({{ paper.year }})
  • Inside the .md files you then simply:
{% include paper_citation.html key="haddock24" %}

This will make sure there is a single-source of information instead of having to manually check a lot of them.

It would be good if further changes follow this pipeline to reduce the maintenance cost of this site.


Note, to have a re-usable block such as haddock_intro it would be defined inside _includes/haddock_intro.md and then used in the page as {% include haddock_intro.md %}

this defines the formatting of the citation
@rvhonorato rvhonorato requested review from amjjbonvin and a team July 11, 2025 11:29
@rvhonorato rvhonorato self-assigned this Jul 11, 2025
@rvhonorato rvhonorato marked this pull request as ready for review July 11, 2025 11:29
Copy link
Member

@amjjbonvin amjjbonvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice solution @rvhonorato

…ce-which-is-no-longer-advanced-online-but-nature-prot-19-32193241-2024
@rvhonorato rvhonorato merged commit 121f8f1 into master Jul 14, 2025
2 checks passed
@rvhonorato rvhonorato deleted the 716-update-of-the-haddock24-server-reference-which-is-no-longer-advanced-online-but-nature-prot-19-32193241-2024 branch July 14, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update of the HADDOCK2.4 server reference which is no longer advanced online, but Nature Prot., 19, 3219–3241 (2024).
2 participants