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

Show categories on home page #35

Open
nazori-eu opened this issue Feb 16, 2021 · 1 comment
Open

Show categories on home page #35

nazori-eu opened this issue Feb 16, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@nazori-eu
Copy link

Is there a way to show the categories on the main page? The same way as tags with the tagsOverview parameter on config.

If not, I would really like to see it.

Thanks, awesome theme.

@monkeyWzr monkeyWzr added the enhancement New feature or request label Mar 16, 2021
@akynazh
Copy link

akynazh commented Apr 3, 2022

 <section id="categories">
    <span class="h1">Categories</span>
    <ul class="category-list" style="list-style-type: square;">
      {{ $AllRegularPagesCount := len .Site.RegularPages }}
      {{ range $elem := .Site.Taxonomies.categories.Alphabetical }}
      <li class="category-list-item">
        <a class="category-list-link" href="{{ $elem.Page.Permalink }}">
          {{- .Page.Title -}}
        </a>
        <span class="category-list-count">{{ .Count }}</span>
      </li>
      {{ end }}
    </ul>
  </section>

add this in index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants