add logic to make citations re-usable #717
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_includes/paper_citation.html
handles the formatting of the data:.md
files you then simply: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 %}