Home / File/ contentlayer.config.js — ui Source File

contentlayer.config.js — ui Source File

Architecture documentation for contentlayer.config.js, a javascript file in the ui codebase. 12 imports, 0 dependents.

File javascript ComponentRegistry Styles 12 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  3ab0029b_bc98_e23e_7c0d_e96099aed850["contentlayer.config.js"]
  a572535f_b25f_7501_dc60_c7a2d320a739["rehype-component.ts"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> a572535f_b25f_7501_dc60_c7a2d320a739
  c38c6bfc_2ef9_6855_c303_4188603dc06e["rehypeComponent"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> c38c6bfc_2ef9_6855_c303_4188603dc06e
  fd3c35e5_783f_b703_3e23_80ad367b4a7a["rehype-npm-command.ts"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> fd3c35e5_783f_b703_3e23_80ad367b4a7a
  35d9ad6a_3613_d958_87c5_5df2ab7a7e35["rehypeNpmCommand"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> 35d9ad6a_3613_d958_87c5_5df2ab7a7e35
  8bb35ffc_49f0_bcc4_984e_cffabf51c3db["compat"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> 8bb35ffc_49f0_bcc4_984e_cffabf51c3db
  119887c6_3f3f_70c8_65da_e7c381858ce0["source-files"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> 119887c6_3f3f_70c8_65da_e7c381858ce0
  277758b6_3514_80da_e03b_f9ef4eaf7306["rehype-autolink-headings"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> 277758b6_3514_80da_e03b_f9ef4eaf7306
  53ade66d_7ed1_0b38_a4dd_077fa1540f17["rehype-pretty-code"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> 53ade66d_7ed1_0b38_a4dd_077fa1540f17
  e7851432_6107_a9da_a0a4_e1d1f962adef["rehype-slug"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> e7851432_6107_a9da_a0a4_e1d1f962adef
  a20ae7fc_47fd_9f1c_dfea_702ee94ff76a["remark-code-import"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> a20ae7fc_47fd_9f1c_dfea_702ee94ff76a
  9e139d1d_3478_0e4f_3ec1_fdcb43986c55["remark-gfm"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> 9e139d1d_3478_0e4f_3ec1_fdcb43986c55
  fcbb6195_57aa_1339_fa5f_694d53020f20["unist-util-visit"]
  3ab0029b_bc98_e23e_7c0d_e96099aed850 --> fcbb6195_57aa_1339_fa5f_694d53020f20
  style 3ab0029b_bc98_e23e_7c0d_e96099aed850 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { getHighlighter } from "@shikijs/compat"
import {
  defineDocumentType,
  defineNestedType,
  makeSource,
} from "contentlayer2/source-files"
import rehypeAutolinkHeadings from "rehype-autolink-headings"
import rehypePrettyCode from "rehype-pretty-code"
import rehypeSlug from "rehype-slug"
import { codeImport } from "remark-code-import"
import remarkGfm from "remark-gfm"
import { visit } from "unist-util-visit"

import { rehypeComponent } from "./lib/rehype-component"
import { rehypeNpmCommand } from "./lib/rehype-npm-command"

/** @type {import('contentlayer/source-files').ComputedFields} */
const computedFields = {
  slug: {
    type: "string",
    resolve: (doc) => `/${doc._raw.flattenedPath}`,
  },
  slugAsParams: {
    type: "string",
    resolve: (doc) => doc._raw.flattenedPath.split("/").slice(1).join("/"),
  },
}

const LinksProperties = defineNestedType(() => ({
  name: "LinksProperties",
  fields: {
    doc: {
      type: "string",
    },
    api: {
      type: "string",
    },
  },
}))

export const Doc = defineDocumentType(() => ({
  name: "Doc",
  filePathPattern: `docs/**/*.mdx`,
  contentType: "mdx",
  fields: {
    title: {
      type: "string",
      required: true,
    },
    description: {
      type: "string",
      required: true,
    },
    published: {
      type: "boolean",
      default: true,
    },
    links: {
      type: "nested",
      of: LinksProperties,
// ... (116 more lines)

Subdomains

Dependencies

Frequently Asked Questions

What does contentlayer.config.js do?
contentlayer.config.js is a source file in the ui codebase, written in javascript. It belongs to the ComponentRegistry domain, Styles subdomain.
What functions are defined in contentlayer.config.js?
contentlayer.config.js defines 2 function(s): Doc, LinksProperties.
What does contentlayer.config.js depend on?
contentlayer.config.js imports 12 module(s): compat, rehype-autolink-headings, rehype-component.ts, rehype-npm-command.ts, rehype-pretty-code, rehype-slug, rehypeComponent, rehypeNpmCommand, and 4 more.
Where is contentlayer.config.js in the architecture?
contentlayer.config.js is located at deprecated/www/contentlayer.config.js (domain: ComponentRegistry, subdomain: Styles, directory: deprecated/www).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free