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

Build an Authors / Contributors / Team / Supporters Page #2

Open
bmann opened this issue Dec 8, 2020 · 1 comment
Open

Build an Authors / Contributors / Team / Supporters Page #2

bmann opened this issue Dec 8, 2020 · 1 comment

Comments

@bmann
Copy link
Contributor

bmann commented Dec 8, 2020

Basically, loop through authors and display pictures and such in a list.

Can also list people who aren't authors and have some categories if we like.

@jsayles
Copy link
Contributor

jsayles commented Dec 11, 2020

I'm working on this one although I focused on Resources, Projects and People. I made a categories page, a category page, and then specifically linked to these three categories in the nav bar.

I'm still learning my way around this theme and brushing up on Jekyll and I'm a little confused about one section in the file _layout/category.html.

<div class="entries-{{ entries_layout }}">
  {% include posts-category.html taxonomy=page.taxonomy type=entries_layout %}
</div>

which in turn does:

{%- for post in site.categories[include.taxonomy] -%}
  {%- unless post.hidden -%}
    {% include archive-single.html %}
  {%- endunless -%}
{%- endfor -%}

I WANTED this to pull in all the posts with this category but that wasn't happening. I instead wrote a section although I'd much rather understand what they were trying to do and why it didn't seem to work.

My code (that DOES include all the posts of this category):

  {% for category in site.categories %}
    {% if category[0] == page.category %}
      {% for post in category[1] %}
        {% include archive-single.html type=entries_layout %}
      {% endfor %}
    {% endif %}
  {% endfor %}

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

2 participants