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

from org-mode to html+json-ld or microdata #1483

Open
MorphicResonance opened this issue Jul 23, 2022 · 2 comments
Open

from org-mode to html+json-ld or microdata #1483

MorphicResonance opened this issue Jul 23, 2022 · 2 comments
Labels
state: inactive Had little or no recent activity type: feature Proposes a new feature

Comments

@MorphicResonance
Copy link

MorphicResonance commented Jul 23, 2022

Read about stencils and powerful abilities , impressed with it.
I plan to make html pages marked up with json-ld from several textual files into .org(org-mode) format through custom site generator.
There is no converter from org-mode to html provided by encoda yet. But Pandoc can convert org-mode to html.

Can anyone outline a method on how to proceed to end up with an html+json-ld ?

@nokome
Copy link
Member

nokome commented Jul 28, 2022

Hi @MorphicResonance thanks for your interest and kind words 🙏🏽 . I created a PR to add Org Mode support since there was already interest in this: #1485. I don't have a lot of time to spend on this right now (but this initial iteration was quick to do) but am happy to spend a bit more time on it and merge if it would be of use to you.

@MorphicResonance
Copy link
Author

MorphicResonance commented Jul 29, 2022

Many scientific/scholar articles are written into org-mode since it is the part of emacs system not just markup language. People need this since pandoc unable to convert from yaml to json. But it able to convert from org to html,. Json is so common for web development. So need to apply two converters.
In addition, team develop innovative article elements such as paragraphing. It's not in the schema.org and is not yet recognized by search engines. But who knows what will happen tomorrow.
My goal is making web pages compatible with search engine guidelines for schema.org. I'm not sure how to mark elements in the text being recognizable as review , for example but your initial solutions for itemprop="author" and table looks promising.
My only solution is to write such special itemprops by hand and include them inside the block

#+BEGIN_EXPORT html
<div itemprop="aggregateRating"
    itemscope itemtype="https://schema.org/AggregateRating">
   Rated <span itemprop="ratingValue">3.5</span>/5
   based on <span itemprop="reviewCount">11</span> customer reviews
  </div>
#+END_EXPORT 

Pandoc ignores html in this block and included in the page as is. They should be included in json too.
If only write such paragraphs with simplified inline markup which I got from org-mode list formatting.

- list element 1 :: description
- list element 2 :: description

Such as:
Rated - 3.5 :: ratingValue /5 based on - 11 :: reviewCount customer reviews
or as links formatted with [ [ ] ].
Converter see such elements and wrap them into div itemprop="aggregateRating".
It's also interesting where to put datepublished and datemodified .
Looks like update for initial release was failed.
How to define for encoda if type is not an article but blogposting or some other type?

@nokome nokome added state: inactive Had little or no recent activity type: feature Proposes a new feature labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: inactive Had little or no recent activity type: feature Proposes a new feature
Projects
None yet
Development

No branches or pull requests

2 participants