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

Hardcoded main section name in where clauses #444

Closed
414n opened this issue Jul 15, 2020 · 1 comment
Closed

Hardcoded main section name in where clauses #444

414n opened this issue Jul 15, 2020 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@414n
Copy link

414n commented Jul 15, 2020

Configuration

  • Operating system with its version: Linux Slackware64 14.2
  • Browser with its version: Mozilla Firefox 68 ESR
  • Hugo version: 0.60.1
  • Tranquilpeak version: 0.4.8-BETA
  • Do you reproduce on https://tranquilpeak.kakawait.com demo?: built-time issue, can't reproduce

Actual behavior

If the site uses more than a main section type (e.g. something other than post or posts), only content under the main section type is presented in list/summary pages, the categories page etc.

Expected behavior

The theme should refrain from using the hardcoded post/post type when looping over pages to compile a list and use the mainSections site parameter as suggested in the docs.

Relevant upstream Hugo issue: gohugoio/hugo#3206

Steps to reproduce the behavior

  1. create a test site with a number of posts under the post section
  2. move them all to a new section test, e.g. mv content/post content/test
  3. no posts are present in the home page list or under the archive or categories pages.

I have already changed some templates to implement this feature. Will publish a PR soon.

@kakawait kakawait added the enhancement New feature or request label Aug 18, 2020
@kakawait kakawait added this to the 0.5.0-BETA milestone Aug 18, 2020
@kakawait
Copy link
Owner

planned for next release

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

2 participants