panr / hugo-theme-terminal

A simple, retro theme for Hugo
MIT License
1.96k stars 737 forks source link

avoid duplication of list template #476

Closed icy-comet closed 1 year ago

icy-comet commented 1 year ago

460 introduced duplication of templates that can simply be avoided by adding an if check. this PR fixes that.

panr commented 1 year ago

Yes, I know we should avoid duplication, but the concept of a "file per kind/type" works well here. Even if we have duplication, we get rid of branching inside the template. Readability/discoverability is also improved because what you want to find is a term layout.

I want to keep separate templates.