Many documentation websites nowadays have a blog, it's an awesome way to announce new features and new releases in an official way
You can view a demo of how it looks here
Dokz have a built in blog feature that can be enabled for a sub path of your website:
1import { DokzProvider, DokzBlogProvider } from 'dokz'2import { useRouter } from 'next/router'34export default function App(props) {5const { Component, pageProps } = props6const { pathname } = useRouter()7if (pathname.startsWith('/blog')) {8return (9<DokzBlogProvider blogRootPath='pages/blog'>10<Component {...pageProps} />11</DokzBlogProvider>12)13}14if (pathname.startsWith('/docs')) {15return (16<DokzProvider>17<Component {...pageProps} />18</DokzProvider>19)20}21return <Component {...pageProps} />22}
To add a page to list all your posts you can add a page that exports the BlogPosts
component
1// pages/index.jsx2export { BlogPosts as default } from 'dokz/src'
This page will render a grid of all you documents under the blogRootPath
directory, using the details given in the front matter
To see a demo of how it looks you can go to the dokz blog
The customization you can do to the blog are similar to what you can do to the docs site
For example you can pass the following props to DokzBlogProvider
:
headerLogo
headerItems
footer
prismTheme
initialColorMode
fontFamily
You can also change the main blog posts grid heading and subheading
1// pages/index.jsx2import { BlogPosts } from 'dokz/src'34export default function Page() {5return <BlogPosts heading='My Blog' subheading='Awesome articles every week' />6}