ভূমিকা
থিম ব্যবহার করতে theme অপশন sveltepress এ পাঠিয়ে দিন।
বিস্তারিত জানতে ভিট প্লাগিন অপশন এবং ডিফল্ট থিম অপশন পড়ুন।
| পছন্দ | উপযোগী ক্ষেত্র | Content model | Search |
|---|---|---|---|
| Default theme | Documentation, product guide ও API reference | Markdown অথবা Svelte-এ লেখা SvelteKit route | Algolia DocSearch অথবা custom wrapper-এর মাধ্যমে Meilisearch (production caveat দেখুন) |
| Blog theme | Editorial site ও সময়ভিত্তিক publication | src/posts-এর Markdown এবং generated route | Built-in Pagefind |
ডিফল্ট থিম
ইন্সটল
npm install --save @sveltepress/theme-default yarn add @sveltepress/theme-default pnpm install @sveltepress/theme-default bun add @sveltepress/theme-default আপনার ভিট কনফিগে যুক্ত করুন
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[] | undefinedArray 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 ডিফল্ট থিম সম্পর্কে আরো বিস্তারিত জানতে ডিফল্ট থিম রেফারেন্স
ব্লগ থিম
ব্লগ থিম post indexing, pagination, tag, category, RSS, Open Graph image, related post, comment এবং Pagefind search UI দেয়। এটি static site তৈরি করে এবং বর্তমানে @sveltejs/adapter-static ও Pagefind post-build step প্রয়োজন।
ব্লগ থিম গাইড দিয়ে শুরু করুন এবং runnable reference হিসেবে লাইভ ডেমো ব্যবহার করুন।