Skip to content
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

how to include publication into about page #34

Closed
ghost opened this issue Dec 14, 2018 · 5 comments
Closed

how to include publication into about page #34

ghost opened this issue Dec 14, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Dec 14, 2018

Can we include publication page as one part into about page, like the news part or social part?
It is unclear how to do this with automatic generation of publication page.

@monkeywithacupcake
Copy link
Contributor

monkeywithacupcake commented Feb 11, 2019

Yes @AndrewTor . You can do this. The jekyll-scholar gem will work regardless of the markdown page that you put it in.

In your About page, add years to your YAML, like so:

layout: about
permalink: /
title: <strong>Albert</strong> Einstein
description: Something about relativity
profile:
  align: right
  image: faces/img.png
  address: >
    <p>whatever</p>

news: true
social: true
nav: true
years: [2014, 2012, 2011, 2010, 2009, 2007]
---```

Then, add the Publications code wherever you want it on the page:

```{% for y in page.years %}
  <h3 class="year">{{y}}</h3>
  {% bibliography -f papers -q @*[year={{y}}]* %}
{% endfor %}```

@ghost
Copy link
Author

ghost commented Feb 11, 2019

Thanks! @monkeywithacupcake , very helpful! It is possible to make publication in the menu link to this publication in about page instead of a new page of publication?

@ghost
Copy link
Author

ghost commented Feb 12, 2019

Ok, I figured it out, using tag name works for me. However, with @monkeywithacupcake suggestions, the publication section in about page doesn't have a good space between itself and other section.

@monkeywithacupcake
Copy link
Contributor

You can change the spacing with css or just add in
if you want to manually break.

I think the best approach would be to put your publications section in a div.

<div class="XXXX">
{% for y in page.years %}
  <h3 class="year">{{y}}</h3>
  {% bibliography -f papers -q @*[year={{y}}]* %}
{% endfor %}
</div>

You can either create a css style that you want or find a styling that you like the spacing of and apply it to the div, where it says class = "XXXX".

@ghost
Copy link
Author

ghost commented Feb 13, 2019

Thank you very much! @monkeywithacupcake

@ghost ghost closed this as completed Feb 13, 2019
This issue was closed.
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

No branches or pull requests

1 participant