-
Notifications
You must be signed in to change notification settings - Fork 18
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
Schema.org structured data support (example with org-mode file). #39
Comments
I haven't forgotten your request. Please remind me, the title field should do to the page Ideally, I'd like to see examples of source pages in the Org format and hand-written mockups of output pages you want to produce from them. |
This comment was marked as outdated.
This comment was marked as outdated.
Could you confirm or deny the following: an org-mode metadata entry will always start with Since soupault 4.0.0 supports a Does something like this look good to you? I assume the plugin should always put the rendered HTML before the page body. Let me know what you think. [hooks.pre-parse]
file = "hooks/org-mode-metadata.lua"
template = """
<h1 id="post-title">{{title}}</h1>
...
""" |
This comment was marked as duplicate.
This comment was marked as duplicate.
Yes metatags always start with |
Processing various metadata from org-mode is part of my trial to create org structured, "content first" and search engine friendly web pages. But the question is bigger and for all users.
With soupault we choose the conventional way of html formatting for design and abandoned templates, their variations and other opinionated hints.
The widely used and conventional way of machine executable content markup is developed by schema.org.
After some progress think here is simple requirements for the plugin that should transfer metatags into
<head>
section of web page.the good news is that it's likely to be possible to convert the just input text without having to write a separate yaml block for json-ld. I talked to the developers from stencil, they'll took care of it.
There is only the 1st task with extraction data for meta tags. And the second item is decided by the converter. So,
<head>
).extract metatags --> run converter to convert input into json--> run the converter again to convert input into html.
My case is without json-ld and operate with microdata. Just take note about json-ld case.
this is input file:
#+begin_example
#+end_example
Plugin should take this is a title of the page from
#+meta_title:
. and this is metadescription of the page from#+meta_description:
.If
#+meta_title:
is not exist then take data from the #+title: (it means that web page title and article title will have identical titles in this case).Then delete these strings with #+meta_... completely and leave other as is (#+title: should be left). Other properties will be applied by converter for microdata markup.
Then place value of title/metadescription variables into title/metadescription tags of the page.
this is basic version of the plugin since converting from org-mode to html by stencila is in development. But it is clear the way plugin should be written, don't think there will be much difference from above.
The text was updated successfully, but these errors were encountered: