Questions tagged [marko]
An HTML-based templating engine that compiles templates to Node.js-compatible JavaScript modules and supports streaming, async rendering and custom tags.
marko
64
questions
2
votes
0
answers
162
views
Has any one gotten @marko/testing-library to work with vitetest?
I have a project in Vite, Fastify and Marko and am trying to use Vitest.
I want to test individual components/templates. Say pass in inputs (props) and test if the output (typically HTML) is as ...
0
votes
1
answer
266
views
Marko in expressjs throwing not a function error
Hi I ran this example on my machine and it says markoExpress() is not a function. Any ideas ? This is example from https://markojs.com/docs/express/
require("@marko/compiler/register"); // ...
0
votes
2
answers
208
views
<await> multiple promises in Marko
In Marko, how can one <await> multiple promises in parallel?
For example, I am looking for something like this:
<await(promise1, promise2)>
<@then|result1, result2|>
promise1 ...
0
votes
1
answer
272
views
How can I dynamically create HTML components in Marko?
I want to create new Marko components every time the user clicks a button — by calling something like the JavaScript DOM method document.createElement("tag"). How can I do this in Marko, not ...
1
vote
2
answers
539
views
Prepend a url to all relative image links in a markdown document
I have a bunch of markdown documents with a mix of relative and absolute image destinations. e.g.
This is some text
![optional caption](/sub/folder/image.png)
And more text
![](https://example.com/...
0
votes
1
answer
75
views
MarkoTag not valid
I have a java application which is serving up a react ts app on the client side. I want to integrate marko into my application in order to access some marko components.
I'm trying to follow a guide on ...
4
votes
1
answer
3k
views
Svelte vs MarkoJS
I’m working on rebuilding a new project for many reasons. Currently the project uses Marko.
I’m investigating if it’s worth moving to svelte.
I actually didn’t find a big difference between them.
Does ...
0
votes
1
answer
161
views
How to pass object to components in marko?
Hello I am trying to call a component with an object as parameter but the component prints the object as string "[object Object]".
In the docs it specify object as an attribute type: https://...
1
vote
1
answer
236
views
Rendering from strings instead of files with MarkoJS
I'm using markojs for my emails templates but now we are moving these templates inside our database to edit them online.
We still need to use marko to keep our full HTML structure and variables ...
0
votes
3
answers
314
views
HTTPS node server doesn't return web pages
So I have just turned my HTTP web application to HTTPS.
So my server.js currently looks like
const https = require('https');
const fs = require('fs');
const options = {
key: fs.readFileSync('...
2
votes
0
answers
204
views
Compile single marko component with webpack
how can I compile a single marko.js component with webpack or marko-cli, so I can use it as npm module from the npm registry?
The component is working well within my projects as an integrated ...
2
votes
1
answer
82
views
eBay skin not working on HTML web pages but successfully installed
I am currently trying to use the @ebay/skin package for UI elements in my marko project but they don't seem to be working.
My package.json file looks like this
{
"name": "marko-starter-demo",
"...
2
votes
0
answers
246
views
Vue client-side and Marko server-side (MPA)
In a multi-page web app project, the server part runs on Node.js and Express.
Marko is used as a template engine for server-side rendering. Example :
<h1>${ out.global.__('user.title') } </...
1
vote
0
answers
222
views
What is the reason of "Cannot read property 'insertInto' of undefined" error in MarkoJS component?
I usually face the above error when doing some changes to a component by listening to the window resize event. I think this happens because somehow the component will get dirty during the update and ...
2
votes
1
answer
251
views
Handlebards.js vs Marko.js: What templating library should I use for a portfolio type website? Marko.js or Handlebars.js?
Handlebards.js vs Marko.js: Link to Marko.js library
I have to develop a portfolio site for a friend. The majority of the site will be static with things like information about the person, skills, ...