diff --git a/_includes/citation-page.html b/_includes/citation-page.html new file mode 100644 index 0000000..8cd87dc --- /dev/null +++ b/_includes/citation-page.html @@ -0,0 +1,19 @@ +{% if page.page_citation and page.title %} +

How to cite this page

+

+ {% if page.contributors %} + {{ page.contributors | join: ", " }}, + {% endif %} + "{{ page.title }}". + {% if site.url %} + {{ site.url | remove: "https://www." | remove: "http://www." | remove: "https://" | remove: "http://" }}. + {% endif %} + {% assign page_url = page.url | absolute_url %} + {{ page_url }} . +

+ +{% endif %} + diff --git a/_layouts/page.html b/_layouts/page.html index c627a07..315d8dd 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -34,6 +34,7 @@

{{ page.title }} {%- endif %} {% include affiliation-tiles-page.html %} {% include contributor-minitiles-page.html %} + {% include citation-page.html %} {%- 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..2c2e473 100644 --- a/pages/documentation/page_mechanics.md +++ b/pages/documentation/page_mechanics.md @@ -45,7 +45,7 @@ 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). - +* `page_citation`: When set to true, it will cause the citation section for the page to be generated in the format: `. . . . .` ### Related pages diff --git a/pages/example_pages/general_page_7.md b/pages/example_pages/general_page_7.md index 42084a9..de53949 100644 --- a/pages/example_pages/general_page_7.md +++ b/pages/example_pages/general_page_7.md @@ -5,6 +5,7 @@ contributors: [Bert Droesbeke, Long Example Contributor , Example Contributor, E coordinators: [Bert Droesbeke] description: This description is used when the page is listed page_id: gp7 +page_citation: true ---