matcornic / matcornic/hugo-theme-learn

The value of the `showhidden` parameter is not properly parsed (`children` shortcode)

Open
#162 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hi,

the children shortcode does not work properly, because every value of the showhidden parameter seems to be interpreted as true, e.g.
{{% children showhidden="false" %}}
{{% children showhidden="anything" %}}
{{% children showhidden="true" %}}

Only {{% children showhidden="" %}} (empty string) seems to be interpreted as false.

Preferred solution: every value - except true - is interpreted as false.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the children shortcode implementation and trace how the showhidden parameter is parsed. Verify the existing behavior with false, arbitrary, true, and empty values; done means only true enables showing hidden children and the other values disable it.

Written by the indexing model from the issue text.

Assessment

Tech stack
hugo
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.