Replies: 1 comment
-
I typically go with Bard for this very reason. If you add a set with the code field it does have an option where the end user can select a language. Perhaps you missed that one? With a bard set an asset field you can do all the responsive image magic you need as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Apologies if I've missed something obvious in the docs, but I was looking to use Statamic for a personal blog that includes code blocks.
For text, I usually have a preference for Markdown but it wouldn't be a dealbreaker if I'd end up with something different.
I was hoping Statamic would make it easy to:
However, I think I'm missing something and could do with a point in the right direction.
Markdown field makes it easy to write text content and define codeblocks with the language using ```language syntax. However, adding images to a post isn't as user friendly in the admin UI compared to a Bard field. I'd have to remember the name of the image and type it into the markdown image syntax, for example.
Bard field, on the other hand, has the user friendly image interface to add images from the main gallery. However, the built-in code blocks don't give the ability to define language.
And with both I couldn't find a way for images added to the content fields itself to be automatically resized and made responsive, etc using Glide. For example, if a massive image is loaded into the gallery and then added to a post it loads the massive image by default.
So my question:
Is there a way to use Statamic for a developer blog with the ability to define codeblock languages, easily add images from the gallery to the post content, and have the images be optimised for front-end rendering?
Beta Was this translation helpful? Give feedback.
All reactions