ভূমিকা

থিম ব্যবহার করতে theme অপশন sveltepress এ পাঠিয়ে দিন।

বিস্তারিত জানতে ভিট প্লাগিন অপশন এবং ডিফল্ট থিম অপশন পড়ুন।

পছন্দউপযোগী ক্ষেত্রContent modelSearch
Default themeDocumentation, product guide ও API referenceMarkdown অথবা Svelte-এ লেখা SvelteKit routeAlgolia DocSearch অথবা custom wrapper-এর মাধ্যমে Meilisearch (production caveat দেখুন)
Blog themeEditorial site ও সময়ভিত্তিক publicationsrc/posts-এর Markdown এবং generated routeBuilt-in Pagefind

ডিফল্ট থিম

ইন্সটল

npm install --save @sveltepress/theme-default
sh
yarn add @sveltepress/theme-default
sh
pnpm install @sveltepress/theme-default
sh
bun add @sveltepress/theme-default
sh

আপনার ভিট কনফিগে যুক্ত করুন

vite.config.(js|ts)
+
+
import { const defaultTheme: ThemeDefaultdefaultTheme } from '@sveltepress/theme-default' 
import { const sveltepress: (options?: SveltepressVitePluginOptions) => PluginOptionsveltepress } from '@sveltepress/vite'
import { function defineConfig(config: UserConfig): UserConfig (+5 overloads)

Type helper to make it easier to use vite.config.ts accepts a direct

UserConfig

object, or a function that returns it. The function receives a

ConfigEnv

object.

defineConfig
} from 'vite'
const const config: UserConfigconfig = function defineConfig(config: UserConfig): UserConfig (+5 overloads)

Type helper to make it easier to use vite.config.ts accepts a direct

UserConfig

object, or a function that returns it. The function receives a

ConfigEnv

object.

defineConfig
({
UserConfig.plugins?: PluginOption[] | undefined

Array of vite plugins to use.

plugins
: [
function sveltepress(options?: SveltepressVitePluginOptions): PluginOptionsveltepress({ SveltepressVitePluginOptions.theme?: ResolvedTheme | undefinedtheme: function defaultTheme(themeOptions?: DefaultThemeOptions | undefined): ResolvedThemedefaultTheme(/** theme options */) }) ], }) export default const config: UserConfigconfig
ts

ডিফল্ট থিম সম্পর্কে আরো বিস্তারিত জানতে ডিফল্ট থিম রেফারেন্স

ব্লগ থিম

ব্লগ থিম post indexing, pagination, tag, category, RSS, Open Graph image, related post, comment এবং Pagefind search UI দেয়। এটি static site তৈরি করে এবং বর্তমানে @sveltejs/adapter-static ও Pagefind post-build step প্রয়োজন।

ব্লগ থিম গাইড দিয়ে শুরু করুন। লাইভ ডেমো সম্পূর্ণ প্রদর্শনী; প্লেগ্রাউন্ডের ব্লগ থিম এন্ট্রি Blog starter আপনাআপনি চালু করে।

কাস্টম থিম

Custom theme-এর কোনো Guide leaf নেই। প্লেগ্রাউন্ড হোম থেকে খুলুন — ফিচার ডিরেক্টরি এন্ট্রি একটি নতুন লেখা Custom theme starter (Default Theme নেই, Blog theme নেই) src/routes/+layout.sveltesrc/routes/+page.md-এ আপনাআপনি চালু করে। প্রিভিউয়ের রঙিন ফ্রেম লেআউট অনুক্রম-এর প্রতিটি স্তর দেখায়: theme.globalLayout (GlobalLayout.svelte), src/routes/+layout.svelte, theme.pageLayout (PageLayout.svelte) এবং পেজ। /foo খুললে src/routes/foo/+layout.svelte-ও দেখা যায়। চীনা ও বাংলা custom-theme-zh / custom-theme-bn এমবেড করে, একই ডিফল্ট পাথে সেই ভাষায় লেখা — অতিরিক্ত /zh/ বা /bn/ রুট নয়।

প্লেগ্রাউন্ডের Kitchen sink এন্ট্রি হলো সবচেয়ে বড় Default Theme প্রকল্প যা একসাথে চলতে পারে (Markdown, Default Theme, i18n, versions, Vite plugin এবং virtual modules)। Blog theme ও custom theme সেই ট্রিতে থাকে না।