Skip to content

pantoken / platforms/hugo/src / toHugoAssets

دالة: toHugoAssets()

toHugoAssets(): HugoFile[]

تجريبي

بناء ملفات أصول الرموز لموقع Hugo (المسارات بالنسبة إلى جذر الموقع).

القيم المرجعة

HugoFile[]

جزء Sass (assets/scss/_pantoken.scss)، ورقة الأنماط البسيطة (assets/css/pantoken.css)، وورقة أنماط النثر (assets/css/pantoken-prose.css).

مثال

اكتب الأصول تحت جذر الموقع

ts
import { writeFileSync, mkdirSync } from "node:fs";
import { dirname, join } from "node:path";
import { toHugoAssets } from "@pantoken/hugo";

for (const { path, content } of toHugoAssets()) {
  const dest = join("./my-site", path);
  mkdirSync(dirname(dest), { recursive: true });
  writeFileSync(dest, content);
}