Svelte preprocessor to import Org mode documents as a component, powered by ox-svelte.
You need the following installed on your machine to properly run this preprocessor:
Register the preprocessor and its corresponding file extention to Svelte config.
The example below is for the svelte.config.js
file that is read by SvelteKit.
import { orgPreprocess } from 'svelte-preprocess-org';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: [".svelte", ".org"],
preprocess: [
orgPreprocess({
// Org preprocessor options
jjj }),
// ...other preprocessors
],
// ...other configurations
};
export default config;
The Org preprocessor option object is the union of three types:
ox
, Org-mode export engine; andox-svelte
, Svelte export backend for Org-mode.For the customization options, see the corresponding Eldoc documents for more information.
These are the list of issues that occur frequently.
In TypeScript projects, you might get this error during compilation.
ox-svelte
already provides the shape of the Org "module", so you can declare the existence of *.org
modules in global declaration files:
declare global {
declare module "*.org" {
import type { OrgModule } from "ox-svelte";
const mod: OrgModule;
export default mod;
}
}