lxndrblz / anatole

Anatole is a minimalistic two-column theme for Hugo.
https://themes.gohugo.io/themes/anatole/
MIT License
652 stars 361 forks source link

feat: Add option to display related posts #300

Closed gummigroda closed 2 years ago

gummigroda commented 2 years ago

Description

New feature: Display related posts after page content

Discussion

283 Feature: Add related posts to footer of post


Aditional Information (Optional)


Checklist

Yes, I included all necessary artefacts, including:


Testing Checklist

Yes, I ensured that all of the following scenarios were tested:


Notify the following users

netlify[bot] commented 2 years ago

Deploy Preview for anatole-demo ready!

Name Link
Latest commit 4c9f4c3285dc0cd443df1b2b9fe1e5843a18298b
Latest deploy log https://app.netlify.com/sites/anatole-demo/deploys/62404727fc69c30009465096
Deploy Preview https://deploy-preview-300--anatole-demo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

lxndrblz commented 2 years ago

@gummigroda Thanks for your PR for one of the outstanding feature requests!

I agree, a bit of styling might improve the appearance even further. Do you need help with the CSS or do you want to create it yourself and have me look over it?

One other thing that would be really cool is the ability to preview the post thumbnails. What do you think?

gummigroda commented 2 years ago

Hi,

Regarding the CSS, I don't really have any idea of what to do. If you or anyone else have the time, please style it as you think it fits.
I totally agree with you, thumbnails would be awesome as seen on other websites and has been the inspiration to this PR. I'm just not sure how to do it as I believe it's tightly connected to the styling?

lxndrblz commented 2 years ago

@gummigroda Thanks for your response. I can take of the styling of the related posts. It might take a bit though, as I am currently quite busy porting all the CSS code to SCSS. So please bare with me. :)

lxndrblz commented 2 years ago

@gummigroda Just want to let you know that I'll work on this one, as soon as I've merged #292.

gummigroda commented 2 years ago

@lxndrblz, No worries.

Looked into the thumbnail possibility and found out that Hugo supports image processing. And as I understand it, to get the images of a related post they need to be in the same "Page Resources". I'm totally new to Hugo and this is a bit beyond me a.t.m.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

lxndrblz commented 2 years ago

@gummigroda I wanted to inform you that I didn't go with the card style I had envisioned earlier as I could not find a viable way to make this work for sites that had both posts with a thumbnail and ones without. Furthermore, is the current approach more inline with the style of the series.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication