-
Notifications
You must be signed in to change notification settings - Fork 29
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
[HUGO] Highlight related articles at the bottom of a page #12
Comments
@jwflory This could be a good feature to add. However, I need more clarification.
With this, I can group articles by this category. However, to filter this grouping in such a way that only articles in this same category are shown on pages in this category, I am running a conditional test matching the value of this category keyword with the parent folder of the article. I noticed in the content folder we have different categories (meta, foss, missions etc...). So an article in the foss folder with the keyword in the front matter as foss will be displayed as a related article ONLY in all other articles that fit this description. Articles in the Meta folder will not be able to display articles which are in the foss folder as related content. Below is a screenshot from two different categories...(I used dummy images.)
Another way could ignore the folder in which the articles are located in and focus just on the keywords located in the front matter, and group related articles solely on these keywords with some other kind of logic such that only other articles with this specific keyword or set of keywords can be related. An example is shown below.
What will be your preferred way? |
@MuluhGodson Thanks for both your patience and interest on this issue! I prefer the first way, where related articles will only appear in the same category as they are published. This better fits the design pattern of the theme. Let me know if this clarifies your query. |
This commit updates the git submodule with @MuluhGodson's changes added in unicef/inventory-hugo-theme#4. Articles can now support front matter for their categories, and articles sharing the same category may appear as related articles at the bottom of the page. Part of #12, but does not yet close it. Signed-off-by: Justin W. Flory (he/him) [UNICEF Innovation] <jflory@unicef.org>
…25) * Content: added categories for related articles * config: added taxonomies for related content and limit of displayed related articles Co-authored-by: Justin W. Flory (he/him) [UNICEF Innovation] <jflory@unicef.org>
Completed by #25. |
Oh my. @jwflory Sorry for not being available. I have been very occupied with other personal commitments. But I am happy to have contributed to this issue. Will be looking at some others. |
Summary
Every article should have suggested reading content from elsewhere at the site. The suggested reading/articles should appear at the bottom of an article.
Background
Is your feature request related to a problem? Please describe:
Sometimes pages cover similar but different topics. It would be good to have a way to link out to related articles that might be interesting to a reader.
Describe the solution you'd like:
Best case scenario is using some kind of keyword indexing to determine which articles are related or not. For example, an article could take
keywords
in the front-matter definition. If keywords in one article match keywords from another, the article would appear at the bottom.Describe alternatives you've considered:
Alternatively, we could manually specify specific articles in one article's front-matter. This is more manual and requires knowledge of other content in the site, but this would likely be a simpler implementation at the cost of more manual labor.
Details
Front-matter is the meta information at the top of every content. On this page, it looks like this:
We could add support to our Hugo theme to look for front-matter tags like
keywords
, check for other content with the same keywords, and then show 3-5 articles at the bottom that match the keyword.WordPress sites often have this functionality, and this feature request is partially inspired by seeing this in WordPress blog sites.
Outcome
Easier for readers to discover related content to what they are reading or searching for.
The text was updated successfully, but these errors were encountered: