Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Related Content' section #193

Open
comnam90 opened this issue Apr 19, 2020 · 10 comments
Open

Add 'Related Content' section #193

comnam90 opened this issue Apr 19, 2020 · 10 comments

Comments

@comnam90
Copy link

Are there any plans to add a related content section to the single page posts?
It'd be nice to have just above the comments section using the built in hugo related content functionality.

@Vimux
Copy link
Owner

Vimux commented Apr 19, 2020

I have no plans, but PRs are always open to everyone.

@gooseyman
Copy link

@Vimux I would like to work on this - just read the contribution guidelines, ok to start on this?

@Vimux
Copy link
Owner

Vimux commented May 23, 2020

@gooseyman,

OK, but I would like to see design mockups or ideas, to read in a few words what exactly you want to do with this and how.

@gooseyman
Copy link

gooseyman commented May 23, 2020

@Vimux I'm proposing that this:

  • should be an additional sidebar widget that users can choose to enable or disable based on need.
  • have the same styling as the"Recent Posts" widget
  • default to using "tags" as the basis for relating posts.

From the default pages, "Getting Started with Hugo" and "(Hu)go Template Primer" are related by the development tag. The image below shows and example of the Related Posts widget in the sidebar.

image

@Vimux
Copy link
Owner

Vimux commented May 23, 2020

should be an additional sidebar widget

It should be section. The original title and description state it clear:

#193 (comment)

Are there any plans to add a related content SECTION to the single page posts?
It'd be nice to have JUST ABOVE THE COMMENTS section using the built in hugo related content functionality.

By default, Mainroad sidebar contains widgets directly not connected with the current page content. So, no TOC, no comments, no related content widgets inside sidebar.


default to using "tags" as the basis for relating posts

I do not think that this should be the responsibility of the theme.

@comnam90
Copy link
Author

I mean I'm not opposed to the idea of it being a side bar instead. I've just found it more common to have it as a section at the end of a post

@gooseyman
Copy link

Understood on #193 (comment) indicating section vs. widget. My proposal was for the widget nonetheless. However, good context on the Mainroad widgets being non-article specific. I agree that it should be a section on the page.

The Wordpress version of theme handles this like so:
image
https://mhthemes.com/demo/?theme=magazine

I do not think that this should be the responsibility of the theme.

I'm not following what you mean. The relation needs to leverage some variables in order to run - what did you have in mind if not using article tags?

@Vimux
Copy link
Owner

Vimux commented May 23, 2020

My quick thoughts about this section:

  • The maximum number of similar articles should be user-configurable through the site config.
  • Related item contains: title (minimal, required), image? (optional), DateTime (optional). Something else?
  • The 3-columns view looks good. Possible edge cases: what if there is only one item inside? Five items? What if some of them don't have thumbnails?

The relation needs to leverage some variables in order to run...

I mean, we should use standard configuration by default. Something like this: .Site.RegularPages.Related .

REF:
https://gohugo.io/content-management/related/#list-related-content
https://gohugo.io/content-management/related/#configure-related-content

@metbril
Copy link

metbril commented May 26, 2022

This issue is little over 2 years old. Any progress or update on this?

@Vimux
Copy link
Owner

Vimux commented May 27, 2022

Nothing has changed since then.

  1. I don't plan to work on it. See Add 'Related Content' section #193 (comment)
  2. I have not seen any mockups of how it should look&feel nor draft solutions trying to solve the problem (and not get around it or just copying from other themes)
  3. I don't see this feature being popular over these two years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants