
Shared Markup in Private Plugins
our developer community is prolific. currently 7,324 custom plugins contribute to 500,000 personalized dashboards every day.
which means we're storing a lot of markup. but more importantly, you're writing a lot of markup. duplicate markup.
today that ends with Shared Markup.
which means we're storing a lot of markup. but more importantly, you're writing a lot of markup. duplicate markup.
today that ends with Shared Markup.
credit where it's due
this feature probably needs no explanation, because it already exists in ~every software development framework outside TRMNL.
to get this done we stood on the shoulders of giants, leveraging Liquid's built-in template rendering.
to get this done we stood on the shoulders of giants, leveraging Liquid's built-in template rendering.
what you can do
shared markup is prepended to each of your plugin's layouts, which means it can be used to include common HTML, JS, stylesheets, <script> tags... it's up to you.
shared markup can also help you write cleaner code by defining partials, or components, that may be freely injected anywhere into other layouts.
shared markup can also help you write cleaner code by defining partials, or components, that may be freely injected anywhere into other layouts.
<!-- shared markup --> {% template say_hello %} Hello there, {{ name }}. {% endtemplate %} <!-- view markup --> {% render "say_hello", name: "General Kenobi" %}
get started here or read the docs.
shared markup is also supported in our local development tool, trmnlp:
https://github.com/usetrmnl/trmnlp
a full example plugin (METAR) with shared markup is available below:
shared markup is also supported in our local development tool, trmnlp:
https://github.com/usetrmnl/trmnlp
a full example plugin (METAR) with shared markup is available below:
- source code: https://github.com/schrockwell/trmnl-metar
- Recipe (install or fork): https://usetrmnl.com/recipes/21542
give plugins a new hairdo
we look forward to seeing how Shared Markup improves your plugin development workflow, and who knows... maybe we'll add account-level libraries for sharing across all your plugins.
or what about a shared component library any TRMNL developer can contribute to and pull from? hmm...
as usual, stay tuned, and stay focused.
or what about a shared component library any TRMNL developer can contribute to and pull from? hmm...
as usual, stay tuned, and stay focused.