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

[Help] How do I make another tab likes "Notes" in abhinav.co? #47

Open
abhishek7h opened this issue Oct 17, 2023 · 1 comment
Open

[Help] How do I make another tab likes "Notes" in abhinav.co? #47

abhishek7h opened this issue Oct 17, 2023 · 1 comment

Comments

@abhishek7h
Copy link

I want to make another tab called "Football". I added "Football" to home.yml and created a file called football.html. The tab appears on my website now. Now how do I add posts to it?

@abhinavs
Copy link
Owner

It's just another directory (like pages) that you need to create. You can follow these steps:

  • create _notes directory on top level (this directory will contain entries for notes)
  • create a file note.html
layout: default
---
{% if site.theme_config.show_navbar == true %}
  {% include horizontal_list.html collection=site.data.home.navbar_entries %}
  <div class="dashed" ></div>
{% endif %}

<header>
  <h1>Notes</h1>
  <p>Notes description.</p>
</header>

{% if site.notes.size > 0 %}
  {% for post in site.notes reversed %}
    <p class="post-list-item">
      <span class="home-date">
        {{ post.date | date: site.theme_config.date_format }}»
      </span>
      <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
    </p>
  {% endfor %}
{% endif %}

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