This repository is the proposal of Spear documentation.
It's easy to build. Just you type the yarn
and yarn build
This documentation site will fetch from local mdx file.
The mdx is unified ecosystem[1], this file has front-matter
fields and main content.
A documentation use the front-matter
as field.
The sample data of mdx is the following:
---
title: Test posting
---
# test posting
this is test posting.
## menu
Sub menu document.
This document project treat title
field as field type. In this case, this doc has title
field (text field type) and body
field (rich text field type).
Note that:
- At the moment, this project use
text
andrich text
field only. - This project use the directory name as
content type
andcontent id
.- If directory is
/data/blog/test.mdx
,content_type
isblog
andcontent id
istest
.
- If directory is
The spear will introduce the injecting api client. #189
This change bring the content collection feature to us.
You can see the mechanism of getting mdx file. code
This code will use front-matter
and remark
libraries.
For detail, see the official documentation of these library.