Closed ragasirtahk closed 6 years ago
CMS: Hugo v0.33 + Netlify CMS hosted on Netlify and GitHub
How would you want the caption saved into the markdown so that Hugo could use it?
Check this out: https://gohugo.io/content-management/shortcodes#figure The example there shows how Hugo uses markdown for figure caption
To use shortcodes like that, you can use registerEditorComponent
, docs here: https://www.netlifycms.org/docs/custom-widgets/#registereditorcomponent. If you need help, I can walk you through it.
Thanks for the info. I think I will be able to use the component without any requirement of help.
Someone has created a custom component for figure
?
Just made a "quick and dirty" custom component for Hugo figures being compatible with src, caption, link and width options.
https://gist.github.com/lnalex/2881c29649bc5d477954f79b3071e408
Nice! You should consider packaging that up and publishing on npm.
- Do you want to request a feature or report a bug? Feature
- What is the current behavior? There is no option to add image caption when we insert an image.
- If the current behavior is a bug, please provide the steps to reproduce.
- What is the expected behavior? There should be an option to add caption to images that a user inserts while writing a blog-post.
- Please mention your CMS, node.js, and operating system version.
- Please link or paste your
config.yml
below if applicable. https://github.com/ragasirtahk/The-ragasirtahk-Blog/blob/master/static/admin/config.yml