PostHTML plugin expand link rel="stylesheet".
npm i -D posthtml-style-expansion
const posthtml = require('posthtml')
posthtml([require('posthtml-style-expansion')({ root: './', encoding: 'utf-8' })])
.process('<link expand="true" href="https://github.com/renyamizuno/posthtml-style-expantion/blob/master/path/index.css" rel="stylesheet">')
.then( result => console.log(result.html))
input.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>posthtml-style-expansion</title>
<link expand="true" href="https://github.com/renyamizuno/posthtml-style-expantion/blob/master/path/index.css" rel="stylesheet">
</head>
<body>
</body>
</html>
output.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>posthtml-style-expansion</title>
<style>.test{display:block;}</style>
</head>
<body>
</body>
</html>
root
: Root folder
encoding
: Default utf-8