website icon indicating copy to clipboard operation
website copied to clipboard

RFC: repo-level config, per-category `nav`

Open CodyJasonBennett opened this issue 3 years ago • 1 comments
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',

CodyJasonBennett avatar Feb 08 '22 11:02 CodyJasonBennett

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',

CodyJasonBennett avatar Aug 07 '22 06:08 CodyJasonBennett