github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/docs-website/static-components/utils/fileToString.js (about)

     1  const fs = require("fs");
     2  
     3  /*
     4   * Docusaurus only allows us to inject string based html into the themed components.
     5   * This is necessary to include svg's and helps with the static components organization.
     6   */
     7  function fileToString(filePath) {
     8    return fs.readFileSync(filePath).toString("utf-8");
     9  }
    10  
    11  module.exports = fileToString;