diff --git a/_includes/citation.html b/_includes/citation.html new file mode 100644 index 0000000..400978d --- /dev/null +++ b/_includes/citation.html @@ -0,0 +1,14 @@ +{% if page.title %} +

How to cite this page

+
+ {% if page.contributors %} + {{ page.contributors | join: ", " }}, + {% endif %} + "{{ page.title }}". + {% if site.url %} + {{ site.url }}. + {% endif %} + {% assign page_url = page.url | absolute_url %} + {{ page_url }} (accessed {{ site.time | date: "%d %B, %Y" }}). +
+{% endif %} diff --git a/_layouts/page.html b/_layouts/page.html index c627a07..281806c 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -34,6 +34,9 @@

{{ page.title }} {%- endif %} {% include affiliation-tiles-page.html %} {% include contributor-minitiles-page.html %} + {% if page.include_citation %} + {% include citation.html %} + {% endif %} {%- if site.theme_variables.github_buttons.position == "bottom" %}
{% include github-buttons.html %} diff --git a/pages/documentation/page_mechanics.md b/pages/documentation/page_mechanics.md index 73d709b..0dc29b5 100644 --- a/pages/documentation/page_mechanics.md +++ b/pages/documentation/page_mechanics.md @@ -45,7 +45,8 @@ It is important to know that you can also set the these key-value pairs on multi * `type`: The type of page, used for [website sections](website_sections). - +* `include_citation`: When set to true, it will cause the citation section for the page to be generated in the format: +`. ( material). Online: . Accessed: `. ### Related pages