-
-
Notifications
You must be signed in to change notification settings - Fork 1
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 integration w/ rehype-meta
#3
Comments
I like the idea, but wouldn’t it be a better idea to make this a separate plugin? I think extracting the document title isn’t related to mdx. In fact, maybe this plugin should be using |
Oh hmm, that’s a great idea. So then it’s more a |
Could also find the first image! |
/cc @ChristianMurphy |
I wonder how far meta data extraction should go. I think extracting the title is obvious, since a document should have one Extracting the description isn’t as obvious. What should be used? The first |
Could be either done on character/word count, or with a For images, classes could also be used to prefer a specific image. I think FB itself finds the biggest image on a page, but that requires file access |
Except has also been mentioned/floated as an idea at remarkjs/remark#794 |
So how about plugins that add stuff to
And then plugins like this one would instead take |
That’s interesting. If we do this, then indeed this plugin has nothing to do with
|
I've worked on a similar pull of author info in the past. |
|
Not yet, it relies on LibGit2 wrapped with NodeGit, NodeGit is working on Node 16 support nodegit/nodegit#1840 (support is currently in alpha) |
If
title
is also stored onvfile.data.meta
,rehype-meta
could use it to populate<title>
in<head>
(https://github.com/rehypejs/rehype-meta#config).(I’m thinking of perhaps writing
rehype-mdx-description
(or named-summary
,-excerpt
?) to also expose the first few words as an export andfile.meta.description
, would be nice if they both could integraterehype-meta
)The text was updated successfully, but these errors were encountered: