open-slide.config.ts
Workspace-level configuration.
The config lives at the workspace root and is fully optional — every field has a sensible default.
import type { OpenSlideConfig } from '@open-slide/core';
const config: OpenSlideConfig = {};
export default config;Schema
type OpenSlideBuildConfig = {
/** Show the deck index (the slide browser) in the static build. */
showSlideBrowser?: boolean;
/** Show on-canvas UI (toolbar, hints) in the static build. */
showSlideUi?: boolean;
/** Show the "download as HTML" button in the static build. */
allowHtmlDownload?: boolean;
};
type OpenSlideConfig = {
/** Folder that contains your decks. Default: 'slides'. */
slidesDir?: string;
/** Dev server port. Default: first free port from 5173 upward. */
port?: number;
/** UI language for the runtime (home, inspector, presenter, etc.). */
locale?: Locale;
/** Build-time UI toggles. */
build?: OpenSlideBuildConfig;
};Common recipes
Public share
const config: OpenSlideConfig = {
build: {
showSlideBrowser: false,
showSlideUi: false,
allowHtmlDownload: false,
},
};Multiple deck folders
slidesDir is a single path today. If you want multiple roots, group them
under one folder and use subfolder ids.
Switch the UI language
import { zhTW } from '@open-slide/core/locale';
const config: OpenSlideConfig = {
locale: zhTW,
};See Locale for the full list of presets and how to ship your own dictionary.
