seanlane / gochowdown

Hugo theme based on the Jekyll chowdown theme
MIT License
71 stars 51 forks source link

should the components have a view too? #6

Closed RMHogervorst closed 3 years ago

RMHogervorst commented 4 years ago

I wonder if the components should be viewable too, you can click them but they are not displayed, that is, there is a page with the title, but nothing else.

seanlane commented 3 years ago

Doesn't seem like a bad idea to me, just have to figure out how hard the change would be. I think all that's required is making a single.html template for components, but I'll have to check it out.

RMHogervorst commented 3 years ago

Oh yeah, that makes sense, that is how I created the json API too

RMHogervorst commented 3 years ago

Just dropping the single.html from recipes into layouts/components works fine for me

seanlane commented 3 years ago

Thanks for the suggestion, that did seem to work well: https://github.com/seanlane/gochowdown/commit/54b825ad0fd57160ac62fb70b77cb6e8959ebcca

It brings up an interesting question, since the view checks for components, so we could have components with components. It's possible that it could break somewhere with a cycle of components, but we'll cross that bridge as it arises.