lgaida / mediumish-gohugo-theme

A mediumish gohugo theme, ported from jekyll
MIT License
131 stars 99 forks source link

Drafts appear in the footer pager in article view #8

Closed metal3d closed 5 years ago

metal3d commented 5 years ago

Hello, first => thanks for that very cool theme.

I remark something strange. In the "post list" view, drafts are not displayed (it's ok), but when I open an article, the bottom pager displays "next article" on a draft one. I'm not familiar on Hugo enough to make a patch, I will try.

metal3d commented 5 years ago

OK, actually I'm wrong. The pager points on the entire contents that are in "content" directory. That's not the behavior I expect. Maybe I'm wrong.

lgaida commented 5 years ago

Hey there :) Thanks for pointing that out. I could reproduce the problem but i'm not sure how to get this fixed at the moment. I'll investigate, so hang on ;)

metal3d commented 5 years ago

No problem, For now I could make some changes in overrides (excepting the pager) and I already put my blog online (metal3d.org) - Your theme is very nice, very clean and provides a good reading experience. I'm very impressed.

Note that I also added highlight.js and many others things - I'll maybe fork and make PR to you, because this theme is very very nice.

lgaida commented 5 years ago

Thanks for your appreciation 👍 Please add a PR if you have some cool features at hand.

(I only ported this theme from jekyll, so most credits go to wowthemes.net , see the original jekyll-theme. There are even some newer commits on the jekyll-theme repo. I will try to merge them into this theme in the next few weeks.)

metal3d commented 5 years ago

No problem.

To reproduce what I said, add content in content directory:

Then navigate to /blog, open one blog ticket, and you'll see the pager at the bottom that provides a link to "about". But, to my point of view, "about" page is not a blog ticket, and should not appear here.

lgaida commented 5 years ago

As of static content like "about" and "contact"-pages i can only refer you to the static-content section of this repo. Nevertheless that doesn't really solve the issue, since someone would still run into this issue when creating more than one folder inside the content folder. I'm working on this!

lgaida commented 5 years ago

Fixed in referenced commit. The solution was easier than thought. There is actually a Page-Variable .NextInSection which can be used in order to navigate between pages of a section only. The previously used .NextPage simply uses all pages. Take a look at the demo-page. I added a second "separate"-blog (see menubar). The posts of the "blog" and the "separate"-blog are paginated separately :+1:

@metal3d can you give me some details or possibly prepare a PR for the highlight.js and also the searchbar you've added to your blog at metal3d.org ?