![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
rehype-document
Advanced tools
Wrap a document around HTML with rehype.
npm:
npm install rehype-document
Say example.md
looks as follows:
## Hello world!
This is **my** document.
...and example.js
like this:
var vfile = require('to-vfile')
var report = require('vfile-reporter')
var unified = require('unified')
var parse = require('remark-parse')
var mutate = require('remark-rehype')
var stringify = require('rehype-stringify')
var doc = require('rehype-document')
unified()
.use(parse)
.use(mutate)
.use(doc, {title: 'Hi!'})
.use(stringify)
.process(vfile.readSync('example.md'), function(err, file) {
console.error(report(err || file))
console.log(String(file))
})
Now, running node example
yields:
example.md: no issues found
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hi!</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h2>Hello world!</h2>
<p>This is <strong>my</strong> document.</p>
</body>
</html>
rehype().use(document[, options])
Wrap a document around a fragment.
options
options.title
string
, default: name of file, if any — Text to use as title.
options.language
string
, default: 'en'
— Natural language of document (BCP 47).
options.responsive
boolean
, default: true
— Whether to insert a meta[viewport]
.
options.doctype
string
, default: '5'
— Doctype to use.
options.css
string
or Array.<string>
, default: []
— Stylesheets to include in head
.
options.meta
Object
or Array.<Object>
, default: []
— Metadata to include in head
.
Each object is passed as properties
to hastscript
with a meta
element.
options.link
Object
or Array.<Object>
, default: []
— Link tags to include in head
.
Each object is passed as properties
to hastscript
with a link
element.
options.js
string
or Array.<string>
, default: []
— Scripts to include at end of
body
.
rehype-format
— Format HTMLrehype-minify
— Minify HTMLSee contributing.md
in rehypejs/rehype
for ways to get
started.
This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.
FAQs
rehype plugin to wrap a document around a fragment
The npm package rehype-document receives a total of 8,277 weekly downloads. As such, rehype-document popularity was classified as popular.
We found that rehype-document demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.