lumeland / experimental-plugins Goto Github PK
View Code? Open in Web Editor NEWA repo to test and experiment with plugins for Lume
A repo to test and experiment with plugins for Lume
With the CSP middleware it is possible to enable reporting of CSP violations to an API endpoint using the legacy v0 Report-To
, or v1 Reporting-Endpoints
directives (more info). Using the Reporting API, the browser sends a violation report as an HTTP POST request with content type: ['application/json', 'application/csp-report', 'application/reports+json']
to the endpoint.
Would it be possible to create a middleware to setup an API endpoint and listen for incoming reports, like described here in the example for node js, to listen for incoming reports?
// node js example
app.use(
bodyParser.json({
type: [
'application/json',
'application/csp-report',
'application/reports+json',
],
})
);
app.post('/__cspreport__', (req, res) => {
console.log(req.body);
});
Another great example how this could be done found in this blog post Monitoring Content Security.
I really like the possibility to have a all-in-one-minifier-plugin
. Since the minifier package has issues, is deprecated/archived and not maintained, I suggest replacing the minify plugin with a new plugin using wilsonzlin/minify-html, which can minify HTML + JS + CSS, has a lot of userOptions, is great maintained, optimized and comes already with Deno/WASM support.
The reason I suggest this, I run into an issue when using the current minify plugin with rehype-prism-plus
. It is removing all whitespaces from the <pre>
tags:
minify-html
is optimized respecting the tags.
@oscarotero again if this is okay for you, I will create a PR for minify-html
plugin.
My test build doesn't work with the simple blog theme because it depends on a plugin from here which requests core/utils.ts
.
It appears this file was removed in November: lumeland/lume@75af978
It appears multiple plugins try to import this module.
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.