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

Support h-feed h-entry #10108

Closed
sjehuda opened this issue Jul 19, 2022 · 4 comments
Closed

Support h-feed h-entry #10108

sjehuda opened this issue Jul 19, 2022 · 4 comments

Comments

@sjehuda
Copy link

sjehuda commented Jul 19, 2022

It's a great idea and would be a good to integrate in addition to the currently provided RSS feed.

h-feed is a simple, open format for publishing a stream or feed of h-entry posts, like complete posts on a home page or archive pages, or summaries or other brief lists of posts. h-feed is one of several open microformat draft standards suitable for embedding data in HTML.

https://microformats.org/wiki/h-entry
https://microformats.org/wiki/h-feed

@Seirdy
Copy link
Contributor

Seirdy commented Jul 20, 2022

I think h-feed and h-entry should be implemented manually by Hugo theme and/or site authors. Microformats add class names to a page, but someone still has to design a page. There's way more diversity in h-feed design than RSS, Atom, or JSON-feed design because h-feeds are webpages meant for humans first, machines second. Providing built-in h-feed templates would be akin to providing a default incomplete theme.

That being said, I could imagine other microformats getting shortcodes and templates. A shortcode and/or partial for h-cite, h-card, etc. could work. I've made a few microformats shortcodes and could upstream simplified versions if there is sufficient interest.

POSSE from https://seirdy.one/notes/2022/07/20/hugo-microformats/

@mcexit
Copy link

mcexit commented Sep 14, 2022

I see a lot of value of potentially finding ways to integrate microformats or some form thereof into Hugo, especially for the Google-recommended JSON-LD format. Not that it can't be done with custom templating but it ends up adding a lot of expensive operations and duplication, both in terms of templates and community efforts.

I wonder if one way to approach the subject would be to start by integrating a JSON schema library (Helm already does this12)

Note, there are probably better libraries.
See also #9725


Once that is done, then maybe some internal templates can be added that enforce those schemas. One approach that I've long-considered is to support data files alongside content so that .Data on pages would either search the relative section in the Data folder3, a data file in a leaf bundle, or simply a data key in the frontmatter. Some combination may be preferable as a single h-card can have quite a bit of data which you may not want overwhelming your frontmatter.

Footnotes

  1. https://helm.sh/docs/topics/charts/#schema-files

  2. https://github.com/xeipuuv/gojsonschema

  3. https://github.com/xeipuuv/gojsonschema

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

Copy link

github-actions bot commented Dec 1, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants