frigate/docs/plugins/js-yaml-loader.js
Josh Hawkins c99d6b0dcf
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
Miscellaneous fixes (#23648)
* sort preview cameras in history by ui order

* sort cameras by UI order in various components for consistent display

* add no recordings faq

* fix link

* recording cache faq

* add link

* improve anchor naming in object detector docs

rather than #configuration-1, #configuration-2, etc

* use yaml instead of json for object detector docs

* fix anchor
2026-07-07 10:56:43 -06:00

10 lines
373 B
JavaScript

const yaml = require("js-yaml");
// Webpack loader that compiles a YAML file into a default-exported JS object,
// so docs data can be authored in YAML (block scalars, no quote/newline
// escaping) but imported exactly like the JSON it replaces.
module.exports = function (source) {
const data = yaml.load(source);
return `export default ${JSON.stringify(data)};`;
};