seanlane / gochowdown

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

How to show the recipes on the front page? #2

Closed RMHogervorst closed 5 years ago

RMHogervorst commented 5 years ago

Hi Sean, Love this theme! When I create recipes I dont see the recipes on the frontpage as the image on the readme suggest, I only see a blue block with 'Recipes' and if I click on that I see a list of recipes.

seanlane commented 5 years ago

Hmm, that's interesting. Can you post a screenshot here, and compare your project's directory structure to my recipe site here?: https://github.com/seanlane/recipes

RMHogervorst commented 5 years ago

These are the screenshots of my home and /recipes page

Screenshot 2019-09-18 at 08 09 57 Screenshot 2019-09-18 at 08 11 43

project dir looks like this (it is similar to yours but without an _index.md file in content :

.
├── archetypes
│   ├── component-combined
│   │   └── index.md
│   ├── default.md
│   ├── recipe-component
│   │   └── index.md
│   └── recipe-simple
│       └── index.md
├── config.yaml
├── content
│   ├── components
│   │   ├── bechamelsaus
│   │   │   └── index.md
│   │   ├── bloemkool-koken
│   │   │   └── index.md
│   │   ├── champignon-ui-knoflook-parmezaanse-kaas-creme-fraiche
│   │   │   └── index.md
│   │   ├── couscous-klaarmaken-koud
│   │   │   └── index.md
│   │   ├── couscous-koken
│   │   │   └── index.md
│   │   ├── kikkererwten-knoflook-curry-met-ketjap
            --truncated some recipes from here
│   └── recipes
│       ├── courgettesoep-met-turks-brood
│       │   └── index.md
            --- truncated some here
├── data
├── layouts
│   ├── partials
│   │   ├── all-taxonomies-keys-and-pages.html
│   │   ├── home.html
│   │   └── taxonomy
│   │       └── weken.html
│   └── recipes
│       └── single.html
├── resources
│   └── _gen
│       ├── assets
│       │   └── scss
│       │       └── scss
│       │           ├── gochowdown.scss_46566d2b863ffad177e3cb0dd1e89bd9.content
│       │           └── gochowdown.scss_46566d2b863ffad177e3cb0dd1e89bd9.json
│       └── images
├── static
└── themes
    └── gochowdown
        ├── LICENSE.md
        ├── README.md
        ├── archetypes
        │   ├── default.md
        │   ├── posts.md
        │   └── recipe-bundle
        │       ├── awesome-recipe-image.jpg
        │       └── index.md
        ├── assets
        │   └── scss
        │       ├── _base.scss
        │       ├── _content.scss
        │       ├── _footer.scss
        │       ├── _navigation.scss
        │       ├── _pagination.scss
        │       ├── _variables.scss
        │       └── gochowdown.scss
        ├── exampleSite
        │   ├── LICENSE
        │   ├── Makefile
        │   ├── config.yml
        │   ├── content
        │   │   ├── _index.md
        │   │   ├── components
        │   │   │   ├── graham-cracker-crust
        │   │   │   │   ├── graham-cracker-crust.jpg
        │   │   │   │   └── index.md
        │   │   │   ├── red-berry-dessert-topping
        │   │   │   │   ├── index.md
        │   │   │   │   └── red-berry-dessert-topping.jpg
        │   │   │   └── vanilla-custard-filling
        │   │   │       ├── index.md
        │   │   │       └── vanilla-custard-filling.jpg
        │   │   └── recipes
        │   │       ├── best-big-fat-chewy-chocolate-chip-cookie
        │   │       │   ├── best-big-fat-chewy-chocolate-chip-cookie.jpg
        │   │       │   └── index.md
        │   │       ├── classic-lasagna
        │   │       │   ├── classic-lasagna.jpg
        │   │       │   └── index.md
        │   │       ├── easy-pancakes
        │   │       │   ├── easy-pancakes.jpg
        │   │       │   └── index.md
        │   │       └── red-berry-tart
        │   │           ├── index.md
        │   │           └── red-berry-tart.jpg
        │   ├── layouts
        │   └── static
        │       └── style.css
        ├── images
        │   ├── screenshot.png
        │   └── tn.png
        ├── layouts
        │   ├── 404.html
        │   ├── _default
        │   │   ├── baseof.html
        │   │   ├── list.html
        │   │   └── single.html
        │   ├── index.html
        │   ├── partials
        │   │   ├── 404.html
        │   │   ├── footer.html
        │   │   ├── header.html
        │   │   ├── home.html
        │   │   ├── list.html
        │   │   ├── page.html
        │   │   ├── pagination.html
        │   │   ├── posts
        │   │   │   └── disqus.html
        │   │   ├── recipe_item.html
        │   │   └── taxonomy
        │   │       ├── category.html
        │   │       ├── cuisine.html
        │   │       └── tags.html
        │   ├── posts
        │   │   ├── list.html
        │   │   └── single.html
        │   ├── recipes
        │   │   └── single.html
        │   └── taxonomy
        │       └── list.html
        ├── resources
        │   └── _gen
        │       └── assets
        │           └── scss
        │               └── scss
        │                   ├── gochowdown.scss_e8eb91dc7ad840ac528020d02599262d.content
        │                   └── gochowdown.scss_e8eb91dc7ad840ac528020d02599262d.json
        ├── static
        │   └── assets
        │       └── tile.png
        └── theme.toml

79 directories, 96 files
RMHogervorst commented 5 years ago

If I add the _index.md nothing changes, so that is not it.

(To be exact: I'm only checking this locally with hugo serve, but I would expect the output to be like the real website should be.)

seanlane commented 5 years ago

Yeah, at first glance everything seems correct...

Which version of Hugo are you using? (run hugo version). It wouldn't be the first time that this theme broke on a different version of Hugo.

seanlane commented 5 years ago

Yep, updating from Hugo 0.55.6 to 0.58.2 broke it for me as well, I'll try to figure out what's going on

RMHogervorst commented 5 years ago

oh really! it is indeed 0.58.1

seanlane commented 5 years ago

Ok, adding one word and a period in layouts/partials/home.html fixed it :)

https://github.com/seanlane/gochowdown/commit/e2e55cda8c9442dfa5d64d32081a5e1f08bfd6eb#diff-c32e260564742d2c011905833860023aL4

Try pulling the latest changes and see if it works now

RMHogervorst commented 5 years ago

Cool! This latest pull does get rid of the warnings I used to see, but the frontpage looks still as empty as before. I'm now at 1a3a9925f34f17a1350d2bcd300ffeb027791db5

seanlane commented 5 years ago

That's odd, I think these changes should have fixed the issue. Can you try updating Hugo, and then reporting back the output of hugo version?

Maybe it's being cached somehow?

RMHogervorst commented 5 years ago

yes did both an update and tried with several clear cache thingies: --ignoreCache and --gc, but it doesn't seem to work. Maybe I'm overriding something or maybe it is because not all the recipes have pictures?

RMHogervorst commented 5 years ago

only one has a picture actually

RMHogervorst commented 5 years ago

I found the problem. I created a new home partial that overrides your version, I removed the part that speaks about how awesome the theme is for developers but I must have also removed the other components by mistake!

seanlane commented 5 years ago

Ah, that makes sense. Glad this was able to be sorted out! Closing the issue, since it appears to be resolved.