pantoken / platforms/jekyll/src / toJekyllAssets
Function: toJekyllAssets()
toJekyllAssets():
JekyllFile[]
Experimental
Build the token asset files for a Jekyll site (paths relative to the site root).
Returns
The Sass partial (_sass/pantoken.scss), the plain stylesheet (assets/css/pantoken.css), and the prose stylesheet (assets/css/pantoken-prose.css).
Example
Write the assets under a site root
ts
import { writeFileSync, mkdirSync } from "node:fs";
import { dirname, join } from "node:path";
import { toJekyllAssets } from "@pantoken/jekyll";
for (const { path, content } of toJekyllAssets()) {
const dest = join("./my-site", path);
mkdirSync(dirname(dest), { recursive: true });
writeFileSync(dest, content);
}