- Bloapi π§
- The Problem
- Let's Play Practical
- Perfect Fit for
- Kind of meta
- Kind of data
- Features
- Get started
- LICENSE
- To start
nextjs
blog, making own cms api is essential. But that's pretty annoying process. - Blog templates can solve this problem, but templates often contain too much unnecessary stuff.
start with just what we need.
Api π
+Essential feature π¦
- Focus only on making UI
- Choose tech stack oneself
- Minimal, Customizable, Solid blog
π
bloapi
supports rich post meta option
---
title: post title
preview: post preview
author: post author
update: 2022/08/15 # < YYYY/MM/DD >
color: "#A68A68" # < "{ HEX | rgba | rgb }" >
tags: tag1, tag2 # split by comma
---
---
series: javascript-1 # < {seriesTitle}-{order} >
bannerUrl: /category/post # nextjs static image location
reference: ref1, ref2 # split by comma
postpone: true # if true, post will not published
---
Let's look at the data
we receive on each page by core
api
- main:
pages/index.tsx
Link to π: https://{deploy-url}/
interface MainPageProps {
latestPost: MetaType[]
// β
main-page latest post
// π‘ types/post/meta.ts
mainCategory: CategoryInfoType[]
// β
main-page displaying category
// π‘ types/category/index.ts
}
- category:
pages/category.tsx
Link to π: https://{deploy-url}/category
interface AllCategoryPageProps {
allCategoryInfo: CategoryInfoType[]
// β
all category of blog
// π‘ types/category/index.ts
}
- profile:
pages/profile.tsx
Link to π: https://{deploy-url}/profile
interface ProfilePageProps {
profileSource: string
// β
extracted source of {blog-dir}/profile/description.mdx
}
- {category}:
pages/[category].tsx
Link to π: https://{deploy-url}/{category}
interface CategoryPageProps extends CategoryInfoType {
// β
specific category info
// π‘ types/category/index.ts
latestPost: MetaType[]
// β
latest-post of specific category
// π‘ types/post/meta.ts
latestTag: string[]
// β
latest-post-tag of specific category
allSeries: SeriesType[]
// β
series of specific category
// π‘ types/post/series.ts
}
- {category}/{page}:
pages/[category]/[page]/index.tsx
Link to π: https://{deploy-url}/{category}/{page}/
interface PaginatedCategoryPageProps extends CategoryInfoType {
allPost: MetaType[]
// β
paginated-post of specific category
// π‘ types/post/meta.ts
allTag: string[]
// β
paginated-post-tag of specific category
page: number
// β
current page number
isLastPage: boolean
}
- {category}/{page}/{postTitle}:
pages/[category]/[page]/[postTitle].tsx
Link to π: https://{deploy-url}/{category}/{page}/{postTitle}
interface PostPageProps extends PostWithControllerType {
// β
specific post + controller [prev, next post]
// π‘ types/post/index.ts
seriesInfo: SeriesType | null
// β
specific post's seriesInfo. nullable
// π‘ types/post/series.ts
}
- MDX full support with mdx-bundler
- CLI posting support
SEO
optimized with next-seoRSS
/SITEMAP
generation inscripts
- First Load Js β‘οΈ
44.5kb
β‘οΈ, preact on production build Toc
object generation on server-side- Image optimized with
next/image
and support automatic-sizing - Google-analytics full support in party-town-thread
- Code highlight with rehype-prism-plus
- Math expression optional support with
katex
- Kind error message
- Kind
tsdoc
. Read doc withcmd
+mouse hover
shortcut in vscode
Click π§ Use This Template
or π§ git clone
MIT