mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-28 07:09:50 +00:00
86 lines
1.4 KiB
TypeScript
86 lines
1.4 KiB
TypeScript
import type { StaticSource } from '@/source';
|
|
|
|
export const source: StaticSource = {
|
|
files: [
|
|
{
|
|
type: 'meta',
|
|
path: 'meta.json',
|
|
data: {
|
|
pages: ['z...a'],
|
|
},
|
|
},
|
|
{
|
|
type: 'page',
|
|
path: '1-2.mdx',
|
|
data: {
|
|
title: 'Orange',
|
|
},
|
|
},
|
|
{
|
|
type: 'page',
|
|
path: '2-2.mdx',
|
|
data: {
|
|
title: 'Apple',
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
// priority to determine the owner of a node (from top to low):
|
|
// 1. directly specified (e.g. path in `pages`).
|
|
// 2. extracted (e.g. `...dir`).
|
|
// 3. rest `...`.
|
|
export const withPriority: StaticSource = {
|
|
files: [
|
|
{
|
|
type: 'page',
|
|
path: '/a/hello.mdx',
|
|
data: {
|
|
title: 'Page A',
|
|
},
|
|
},
|
|
{
|
|
type: 'meta',
|
|
path: 'b/meta.json',
|
|
data: {
|
|
pages: ['test', '...'],
|
|
},
|
|
},
|
|
{
|
|
type: 'page',
|
|
path: '/b/index.mdx',
|
|
data: {
|
|
title: 'Page B (Index)',
|
|
},
|
|
},
|
|
{
|
|
type: 'page',
|
|
path: '/b/hello.mdx',
|
|
data: {
|
|
title: 'Page B (Hello)',
|
|
},
|
|
},
|
|
{
|
|
type: 'page',
|
|
path: '/b/test.mdx',
|
|
data: {
|
|
title: 'Page B (Test)',
|
|
},
|
|
},
|
|
{
|
|
type: 'meta',
|
|
path: 'c/meta.json',
|
|
data: {
|
|
pages: ['test', '...../b'],
|
|
},
|
|
},
|
|
{
|
|
type: 'page',
|
|
path: '/c/test.mdx',
|
|
data: {
|
|
title: 'Page C',
|
|
},
|
|
},
|
|
],
|
|
};
|