Expand description
§dioxus-docs-kit
Reusable documentation site shell and blog engine for Dioxus applications.
Provides a complete docs layout with sidebar navigation, search modal, page navigation, OpenAPI API reference pages, and mobile drawer. Also includes a full blog engine with post listing, tag filtering, search, reading time, and MDX rendering.
§Quick Start — Docs
ⓘ
use dioxus::prelude::*;
use dioxus_docs_kit::{DocsConfig, DocsRegistry, DocsContext, DocsLayout, DocsPageContent};
use std::sync::LazyLock;
static DOCS: LazyLock<DocsRegistry> = LazyLock::new(|| {
DocsConfig::new(include_str!("../docs/_nav.json"), doc_content_map())
.with_default_path("getting-started/introduction")
.build()
});§Quick Start — Blog
ⓘ
use dioxus::prelude::*;
use dioxus_docs_kit::{BlogConfig, BlogRegistry, BlogContext, BlogLayout, BlogList, BlogPostView};
use std::sync::LazyLock;
dioxus_docs_kit::blog_content_map!();
static BLOG: LazyLock<BlogRegistry> = LazyLock::new(|| {
BlogConfig::new(include_str!("../blog/_blog.json"), blog_content_map())
.with_posts_per_page(9)
.build()
});Re-exports§
pub use config::DocsConfig;pub use config::ThemeConfig;pub use registry::DocsRegistry;pub use registry::ApiEndpointEntry;pub use registry::SearchEntry;pub use components::CurrentTheme;pub use components::DocsLayout;pub use components::DocsLayout;pub use components::DocsPageContent;pub use components::DocsPageContent;pub use components::DocsSidebar;pub use components::DocsSidebar;pub use components::DrawerOpen;pub use components::LayoutOffsets;pub use components::MobileDrawer;pub use components::MobileDrawer;pub use components::SearchButton;pub use components::SearchButton;pub use components::SearchModal;pub use components::SearchModal;pub use components::ThemeToggle;pub use components::ThemeToggle;pub use hooks::DocsProviders;pub use hooks::use_docs_providers;pub use blog::types::Author;pub use blog::types::BlogFrontmatter;pub use blog::types::BlogPost;pub use blog::types::BlogSearchEntry;pub use blog::BlogConfig;pub use blog::BlogProviders;pub use blog::BlogRegistry;pub use blog::use_blog_providers;pub use components::AuthorInfo;pub use components::AuthorInfo;pub use components::BlogCard;pub use components::BlogCard;pub use components::BlogIndexMeta;pub use components::BlogIndexMeta;pub use components::BlogLayout;pub use components::BlogLayout;pub use components::BlogList;pub use components::BlogList;pub use components::BlogMobileDrawer;pub use components::BlogMobileDrawer;pub use components::BlogPostMeta;pub use components::BlogPostMeta;pub use components::BlogPostView;pub use components::BlogPostView;pub use components::BlogSearchButton;pub use components::BlogSearchButton;pub use components::BlogSearchModal;pub use components::BlogSearchModal;pub use components::BlogThemeToggle;pub use components::BlogThemeToggle;pub use components::ReadingProgressBar;pub use components::ReadingProgressBar;pub use components::ReadingTimeBadge;pub use components::ReadingTimeBadge;pub use components::RelatedPosts;pub use components::RelatedPosts;pub use components::TagFilter;pub use components::TagFilter;
Modules§
- blog
- Blog engine module for dioxus-docs-kit.
- components
- config
- Builder for constructing a
DocsRegistry. - hooks
- registry
- Documentation content registry.
Macros§
- blog_
content_ map - Generates a
blog_content_map()function that returns aHashMap<&'static str, &'static str>from the build-script output. - doc_
content_ map - Generates a
doc_content_map()function that returns aHashMap<&'static str, &'static str>from the build-script output.
Structs§
- ApiOperation
- API endpoint operation.
- ApiTag
- Tag metadata.
- Blog
Context - Navigation bridge for blog pages, decoupled from the consumer’s Route enum.
- Docs
Context - Navigation bridge that decouples library components from the consumer’s Route enum.
- Open
ApiSpec - Parsed OpenAPI specification.
- Parsed
Doc - Parsed documentation page with frontmatter and content.
Enums§
- Http
Method - HTTP method.
Functions§
- DocContent
- Render a list of DocNodes.
- DocTable
OfContents - Table of contents sidebar component with scroll tracking.
- Endpoint
Page - Full-page two-column layout for a single API endpoint.
- Mermaid
Diagram - Renders a mermaid diagram.
- extract_
headers - Extract headers from markdown content for table of contents.
- highlight_
code - Apply syntax highlighting to code.