hugo-theme-codex icon indicating copy to clipboard operation
hugo-theme-codex copied to clipboard

#73 Enable summary for the post in blog

Open aldrineeinsteen opened this issue 5 years ago • 12 comments

The changes add a clean navigation bar in the bottom of the blog. image

The active element will be bold and highlighted

aldrineeinsteen avatar Jul 13 '20 18:07 aldrineeinsteen

Enabled the configuration in params section for enabling blog summary image

aldrineeinsteen avatar Jul 13 '20 18:07 aldrineeinsteen

Closes #73

aldrineeinsteen avatar Jul 13 '20 18:07 aldrineeinsteen

Thank you for your contribution!

The changes add a clean navigation bar in the bottom of the blog.

Could you limit the scope of this PR to only adding the summary? Also a screenshot of the summary in the list would be great.

Regarding your bottom bar, could you separate it to a different PR, and elaborate on the use case?

kentnek avatar Jul 13 '20 19:07 kentnek

@aldrineeinsteen thanks for this work! I agree with @kentnek, let's try and keep this one to the addition of an optional summary in the post list only.

Also, I notice git picking up some changes related to formatting. This shouldn't be the case because we have prettier running on any files staged for commit. When pulling the repository did you run yarn install? Check out the CONTRIBUTING.md file for more info, and ping here if you need any help 😄

jakewies avatar Jul 14 '20 02:07 jakewies

Thank you @jakewies / @kentnek ; Let me segregate the PR into two

  1. Summary info - options
  2. Pagination

aldrineeinsteen avatar Jul 14 '20 04:07 aldrineeinsteen

Could you replace the screenshot in the PR to that of the "summary"?

kentnek avatar Jul 14 '20 14:07 kentnek

I think the code looks good now, but the styling needs some magic from @jakewies.

In my opinion, the summary text and "Read more" should be slightly lighter than the main title. Also I'd prefer the "Read more" button to be left-aligned so it doesn't break the vertical flow of the page.

kentnek avatar Jul 14 '20 16:07 kentnek

@kentnek as far as formatting goes, I made a mention of this in an early review. The comment is still unresolved. I'm waiting to here back from @aldrineeinsteen on the topic.

I'll take a look at the styles later today and work my magic.

jakewies avatar Jul 14 '20 16:07 jakewies

hat of the "summary"?

done :)

aldrineeinsteen avatar Jul 15 '20 09:07 aldrineeinsteen

Finally got around to making style adjustments on this PR.

Capture

A few notes here:

  • We will need to document how Hugo renders these summaries. You can find out more here. You'll notice in the picture above that the second post has some broken formatting. That's because it does not use Hugo's summary declaration. The first post does. My thoughts are that we update the README to include a link to this documentation and suggest that if users want to add a summary, they do so using the documented syntax.
  • There seems to be some conflicts with regenerated assets. I'm assuming the best way to resolve would be to rebase against the master branch. I'll handle that.

@kentnek let me know your thoughts on the visuals. If things are good to go I'll handle the conflicts and we can merge this one.

jakewies avatar Jul 28 '20 19:07 jakewies

You'll notice in the picture above that the second post has some broken formatting.

I think it's a good idea to add the <--more--> summary divider to that example post, so it'd render better and also showcase to the user they can do that too.

kentnek avatar Jul 29 '20 09:07 kentnek

I thought the same. I didn't know if it was frowned upon to update the default example content provided by Hugo.

But I'll go ahead and clean those up.

jakewies avatar Jul 29 '20 12:07 jakewies