-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Enhancement: Post processing script on content type #376
Comments
I would add a complete "hook system" where we can reference scripts on several activities/events, but post-creation comes to mind first. |
I have a specific use case in mind: I have a content type that is basically a youtube video. When creating that post I would want to retrieve that videos thumbnail as a preview image to be saved next to the markdown file of the content. Currently I am doing that via creating the content > manual action with frontmatter button. I would think that is what this feature might be about? |
@davidsneighbour correct, that is my use case as well. The postscript functionality is now available in the latest beta. Here is what you need to do: Create a script The postscript functionality uses the content scripts from the {
"frontMatter.custom.scripts": [
{
"id": "generate-social-image",
"title": "Generate social image",
"script": "./scripts/social-img.js",
}
}
Define the postscript in the content type The content type has a new property called: |
Add the ability to reference a script that will be executed after content creation happened.
The text was updated successfully, but these errors were encountered: