website
website copied to clipboard
RFC: repo-level config, per-category `nav`
trafficstars
Continues #217.
This project is quite hidden, based on the docs branch. I'd suggest eventually moving that branch to its own repo and optionally reading open graph config from libraries' repositories.
// docs.config.json
{
// Directory to look for docs, defaults to repo root
// "root": "docs",
// OpenGraph meta
"title": "React Three Fiber",
"description": "React-three-fiber is a React renderer for three.js",
"image": "docs/social-image.jpg",
// Order categories by pathname, `nav` frontmatter will control page order per category
categories: [
"introduction",
"getting-started"
]
}
We can substitute local, hard-coded config in this repo with a NPM-like repository path:
// data/libraries.ts
'react-three-fiber': 'pmndrs/react-three-fiber/master/docs.config.json',
Curious if we can substitute some of the open graph meta with those from GitHub. Would be nice to point to a repo and have the site find docs.config.json in addition to repo meta.
// data/libraries.ts
'react-three-fiber': 'pmndrs/react-three-fiber',