rehypejs / ideas Goto Github PK
View Code? Open in Web Editor NEWShare ideas for new utilities and tools built with @rehypejs
Home Page: https://unifiedjs.com
Share ideas for new utilities and tools built with @rehypejs
Home Page: https://unifiedjs.com
I've created a small generic asset inliner that I'm using for one of my projects:
https://github.com/marko-knoebl/rehype-inline
It's currently installable as npm package @karuga/rehype-inline
- I'm planning to drop the username prefix.
It inlines css, js and img elements. In contrast to the existing rehype-inline-svg its main goal is creating a single HTML file and not so much optimizing for speed.
I guess this could be included in the list of plugins in the rehype documentation. Before that I'm happy about feedback / testing / suggestions.
remark-lint
is awesome! Let's make the same thing for rehype!
CodeMirror is a code editor. But it is also providing runmode which just does syntax highlighting like highlight.js.
I've already roughly tried in here.
BoostIO/BoostNote-App@db2e16c#diff-55439261af156770136159a7b2bd0271R33-R138
There is an API available for KaTeX.
Something like https://github.com/Smile4ever/Neat-URL
Would be nice to run this on user-generated content, e.g., on the unified explore page where we render readmes, to remove tracking for our users.
Based on a discussion with @wooorm and @kmck in gitter https://gitter.im/unifiedjs/Lobby?at=5b0db4fce26c847ac89f59bb
In a browser context parse5 add significant weight to bundled JavaScript.
Parse5 mostly functions as a replacement for the DOM model, but in a browser DOM will exist, and parse5 could be dropped.
Allowing direct conversion of DOM to HAST.
I've been thinking about how HAST can work with https://github.com/Polymer/lit-html . Some potential ideas:
li
s:export const click = () => {
return (tree: UNIST.Node, vfile: VFile) => {
visit(tree, ['element'], (node: MDAST.Link, index, parent) => {
if (node.tagName === 'li') {
const n = {
type: LIT_TYPE,
template: c => html`<li @click="${onClick}">${c}</li>`, // children are added back later
children: node.children
};
parent.children.splice(index, 1, n);
return true;
}
});
};
function onClick(e) {
e.stopPropagation();
this.classList.toggle('hidden')
}
};
export const clock = () => {
const wait = (t) => new Promise((resolve) => setTimeout(resolve, t));
async function* countUp() {
let i = 0;
while (true) {
yield i++;
await wait(1000);
}
}
return (tree: UNIST.Node, vfile: VFile) => {
visit(tree, ['element'], (node: MDAST.Link, index, parent) => {
if (node.tagName === 'strong') {
const n = {
type: LIT_TYPE,
template: c => html`<span>Count: ${asyncReplace(countUp())}</span>`,
children: node.children
};
parent.children.splice(index, 1, n);
return true;
}
});
};
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.