Get support for kieranja/hubl
If you're new to LTH, please see our FAQ for more information on what it is we do.
Qualified Helpers
kieranja
*This user needs to complete their payout settings before they can accept help requests
kieranja/hubl
IMPORTANT: this is a WIP
hubl
Implementation of HubL using Nunjucks
It's important to note that a fair few of the HUBL tags pull data from the Hubspot CRM/CMS. These methods have been implemented as stubs.
See src/test.js for example.
Why?
I want to be able to test my modules and templates using Jest.
How to use
You'll need to decide if you're running this in the context of node or browser. If you're using Storybook it'll likely run in-browser. However, if you're using webpack it'll run on node (this impacts how included templates are discovered/included)
- npm install hubl
- decide how you want to populate test data using the manager instances.
If you want to render a whole page template, these require a fair bit more bootstrapping.
const pageManager = new PageManager([pages go here]);
const hubdbManager = new HubDBManager({ hubdb tables})
const menuManager = new HubDBManager([ menus ])
// singleton version
configure(pageManager, hubdbManager, menuManager, ctaManager);
const hublTemplateCode = '{{ something | count }}';
renderPageString('/', hublTemplateCode, { ... variables ... })
Modules on the other hand, you can just ignore all the configure stuff as long as you don't use any methods like menu()
renderModuleString('{{ module.variable }}, { variable: 1 });
{{ theme.* }} is set on all.
todo:
- support hubl in scss
- integrate all key filters
- integrate all functions
- integrate all tags
- allow hooks for any methods which use data from hubspot - allowing data to be populated from the API (build a static version of the site), nots sure this is possible yet though.
- support space seperated params for filters - currently you need to use commas.
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2