I render this code like a pro
Anthony Viard 🥑
Posted on December 21, 2021
In the past, I struggled so many times trying to properly render a piece of code, considering the indentation, the coloring syntax, and so on.
Then I discovered PrismJS, a lightweight Javascript library that generates the HTML tags needed to wrap code snippets with a wonderful rendering.
It simply uses <pre>
and <code>
existing tags and the language specified in the CSS class name.
Hmm, what about making this feature reusable by using a component on Entando, the Application Composition Platform?
Of course! Not only is this feature available to me, but also our entire community can easily access it by installing an existing component collection!
To help explain, I created this quick and nifty video below. We’ll walk through becoming a developer, to a developer-contributor and save time (and our sanity) for future solutions.
Step by step, we’ll explore in detail: creating your components, defining bundle descriptions, and sharing on a GitHub repository to use in a sample blog page. The bundle will then be installed and deployed on an Entando instance.
After watching this video, drop a quick comment and share what THE one component is that you would like to share with the community.
Tune in next time as we continue our adventures in this composition world!
Additional resources
Start with Entando components: https://dev.entando.org/v6.3.2/docs/ecr/ecr-bundle-details.html#overview
Start with our JHipster generator, the Entando Component Generator:
https://dev.entando.org/v6.3.2/docs/component-generator/component-gen-overview.html
Learn more about the Entando Component Repository:
Posted on December 21, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 29, 2024