-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from Codehagen/38-feature-contentlayer-to-coll…
…ection 38 feature contentlayer to collection
- Loading branch information
Showing
53 changed files
with
1,523 additions
and
4,816 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
apps/www/.content-collections/cache/content-collection-config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// content-collections.ts | ||
import { defineCollection, defineConfig } from "@content-collections/core"; | ||
import { | ||
createMetaSchema, | ||
createDocSchema, | ||
transformMDX | ||
} from "@fumadocs/content-collections/configuration"; | ||
var docs = defineCollection({ | ||
name: "docs", | ||
directory: "src/content/docs", | ||
include: "**/*.mdx", | ||
schema: createDocSchema, | ||
transform: transformMDX | ||
}); | ||
var metas = defineCollection({ | ||
name: "meta", | ||
directory: "src/content/docs", | ||
include: "**/meta.json", | ||
parser: "json", | ||
schema: createMetaSchema | ||
}); | ||
var content_collections_default = defineConfig({ | ||
collections: [docs, metas] | ||
}); | ||
export { | ||
content_collections_default as default | ||
}; |
1 change: 1 addition & 0 deletions
1
.../cache/docs/sample/373c0aa717d59dfdc79b41cef8de53e8e4e9678c3926ca7aca090bf0576cd359.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"content":"# Welcome to Sample Documentation\n\nThis is a basic MDX file to test if Content Collections is working correctly.\n\n## Features\n\n- Easy to use\n- Supports Markdown syntax\n- Can include React components","title":"Sample Documentation","description":"This is a sample MDX file for testing Content Collections","_meta":{"filePath":"sample.mdx","fileName":"sample.mdx","directory":".","extension":"mdx","path":"sample"},"toc":[{"title":"Welcome to Sample Documentation","url":"#welcome-to-sample-documentation","depth":1},{"title":"Features","url":"#features","depth":2}],"structuredData":{"contents":[{"heading":"welcome-to-sample-documentation","content":"This is a basic MDX file to test if Content Collections is working correctly."},{"heading":"features","content":"Easy to use"},{"heading":"features","content":"Supports Markdown syntax"},{"heading":"features","content":"Can include React components"}],"headings":[{"id":"welcome-to-sample-documentation","content":"Welcome to Sample Documentation"},{"id":"features","content":"Features"}]},"body":"var Component=(()=>{var h=Object.create;var c=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var _=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),j=(e,n)=>{for(var o in n)c(e,o,{get:n[o],enumerable:!0})},r=(e,n,o,l)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let i of p(n))!f.call(e,i)&&i!==o&&c(e,i,{get:()=>n[i],enumerable:!(l=m(n,i))||l.enumerable});return e};var C=(e,n,o)=>(o=e!=null?h(x(e)):{},r(n||!e||!e.__esModule?c(o,\"default\",{value:e,enumerable:!0}):o,e)),M=e=>r(c({},\"__esModule\",{value:!0}),e);var a=_((D,s)=>{s.exports=_jsx_runtime});var w={};j(w,{default:()=>d});var t=C(a());function u(e){let n={h1:\"h1\",h2:\"h2\",li:\"li\",p:\"p\",ul:\"ul\",...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:\"welcome-to-sample-documentation\",children:\"Welcome to Sample Documentation\"}),`\n`,(0,t.jsx)(n.p,{children:\"This is a basic MDX file to test if Content Collections is working correctly.\"}),`\n`,(0,t.jsx)(n.h2,{id:\"features\",children:\"Features\"}),`\n`,(0,t.jsxs)(n.ul,{children:[`\n`,(0,t.jsx)(n.li,{children:\"Easy to use\"}),`\n`,(0,t.jsx)(n.li,{children:\"Supports Markdown syntax\"}),`\n`,(0,t.jsx)(n.li,{children:\"Can include React components\"}),`\n`]})]})}function d(e={}){let{wrapper:n}=e.components||{};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}return M(w);})();\n;return Component;"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"docs":{"sample":["373c0aa717d59dfdc79b41cef8de53e8e4e9678c3926ca7aca090bf0576cd359"]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
export default [ | ||
{ | ||
"content": "# Welcome to Sample Documentation\n\nThis is a basic MDX file to test if Content Collections is working correctly.\n\n## Features\n\n- Easy to use\n- Supports Markdown syntax\n- Can include React components", | ||
"title": "Sample Documentation", | ||
"description": "This is a sample MDX file for testing Content Collections", | ||
"_meta": { | ||
"filePath": "sample.mdx", | ||
"fileName": "sample.mdx", | ||
"directory": ".", | ||
"extension": "mdx", | ||
"path": "sample" | ||
}, | ||
"toc": [ | ||
{ | ||
"title": "Welcome to Sample Documentation", | ||
"url": "#welcome-to-sample-documentation", | ||
"depth": 1 | ||
}, | ||
{ | ||
"title": "Features", | ||
"url": "#features", | ||
"depth": 2 | ||
} | ||
], | ||
"structuredData": { | ||
"contents": [ | ||
{ | ||
"heading": "welcome-to-sample-documentation", | ||
"content": "This is a basic MDX file to test if Content Collections is working correctly." | ||
}, | ||
{ | ||
"heading": "features", | ||
"content": "Easy to use" | ||
}, | ||
{ | ||
"heading": "features", | ||
"content": "Supports Markdown syntax" | ||
}, | ||
{ | ||
"heading": "features", | ||
"content": "Can include React components" | ||
} | ||
], | ||
"headings": [ | ||
{ | ||
"id": "welcome-to-sample-documentation", | ||
"content": "Welcome to Sample Documentation" | ||
}, | ||
{ | ||
"id": "features", | ||
"content": "Features" | ||
} | ||
] | ||
}, | ||
"body": "var Component=(()=>{var h=Object.create;var c=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var _=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),j=(e,n)=>{for(var o in n)c(e,o,{get:n[o],enumerable:!0})},r=(e,n,o,l)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let i of p(n))!f.call(e,i)&&i!==o&&c(e,i,{get:()=>n[i],enumerable:!(l=m(n,i))||l.enumerable});return e};var C=(e,n,o)=>(o=e!=null?h(x(e)):{},r(n||!e||!e.__esModule?c(o,\"default\",{value:e,enumerable:!0}):o,e)),M=e=>r(c({},\"__esModule\",{value:!0}),e);var a=_((D,s)=>{s.exports=_jsx_runtime});var w={};j(w,{default:()=>d});var t=C(a());function u(e){let n={h1:\"h1\",h2:\"h2\",li:\"li\",p:\"p\",ul:\"ul\",...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:\"welcome-to-sample-documentation\",children:\"Welcome to Sample Documentation\"}),`\n`,(0,t.jsx)(n.p,{children:\"This is a basic MDX file to test if Content Collections is working correctly.\"}),`\n`,(0,t.jsx)(n.h2,{id:\"features\",children:\"Features\"}),`\n`,(0,t.jsxs)(n.ul,{children:[`\n`,(0,t.jsx)(n.li,{children:\"Easy to use\"}),`\n`,(0,t.jsx)(n.li,{children:\"Supports Markdown syntax\"}),`\n`,(0,t.jsx)(n.li,{children:\"Can include React components\"}),`\n`]})]})}function d(e={}){let{wrapper:n}=e.components||{};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}return M(w);})();\n;return Component;" | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import configuration from "../../content-collections.ts"; | ||
import { GetTypeByName } from "@content-collections/core"; | ||
|
||
export type Doc = GetTypeByName<typeof configuration, "docs">; | ||
export declare const allDocs: Array<Doc>; | ||
|
||
export type Meta = GetTypeByName<typeof configuration, "meta">; | ||
export declare const allMetas: Array<Meta>; | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// generated by content-collections at Mon Jul 29 2024 19:17:30 GMT+0200 (Central European Summer Time) | ||
|
||
import allDocs from "./allDocs.js"; | ||
import allMetas from "./allMetas.js"; | ||
|
||
export { allDocs, allMetas }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { defineCollection, defineConfig } from '@content-collections/core'; | ||
import { | ||
createMetaSchema, | ||
createDocSchema, | ||
transformMDX, | ||
} from '@fumadocs/content-collections/configuration'; | ||
|
||
const docs = defineCollection({ | ||
name: 'docs', | ||
directory: 'src/content/docs', | ||
include: '**/*.mdx', | ||
schema: createDocSchema, | ||
transform: transformMDX, | ||
}); | ||
|
||
const metas = defineCollection({ | ||
name: 'meta', | ||
directory: 'src/content/docs', | ||
include: '**/meta.json', | ||
parser: 'json', | ||
schema: createMetaSchema, | ||
}); | ||
|
||
export default defineConfig({ | ||
collections: [docs, metas], | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.