diff --git a/.codedoc/build.ts b/.codedoc/build.ts new file mode 100644 index 0000000..8076303 --- /dev/null +++ b/.codedoc/build.ts @@ -0,0 +1,15 @@ +import { build } from '@codedoc/core'; + +import { config } from './config'; +import { installTheme$ } from './content/theme'; +import { content } from './content'; + + +build(config, content, installTheme$, { + resolve: { + modules: ['.codedoc/node_modules'] + }, + resolveLoader: { + modules: ['.codedoc/node_modules'] + } +}); diff --git a/.codedoc/config.ts b/.codedoc/config.ts new file mode 100644 index 0000000..29a4f18 --- /dev/null +++ b/.codedoc/config.ts @@ -0,0 +1,23 @@ + +import { configuration } from '@codedoc/core'; + +import { theme } from './theme'; + + +export const config = /*#__PURE__*/configuration({ + theme, // --> add the theme. modify `./theme.ts` for changing the theme. + dest: { + namespace: '/rest-ez' // --> your github pages namespace. remove if you are using a custom domain. + }, + page: { + title: { + base: 'REST-EZ' // --> the base title of your doc pages + } + }, + misc: { + github: { + user: 'matmar10', // --> your github username (where your repo is hosted) + repo: 'rest-ez', // --> your github repo name + } + }, +}); diff --git a/.codedoc/content/footer.tsx b/.codedoc/content/footer.tsx new file mode 100644 index 0000000..0768db9 --- /dev/null +++ b/.codedoc/content/footer.tsx @@ -0,0 +1,19 @@ +import { CodedocConfig } from '@codedoc/core'; +import { Footer as _Footer, GitterToggle$, Watermark} from '@codedoc/core/components'; + + +export function Footer(config: CodedocConfig, renderer: any) { + let github$; + if (config.misc?.github) + github$ = GitHub; + + let community$; + if (config.misc?.gitter) + community$ = + + if (github$ && community$) return <_Footer>{github$}
{community$}; + else if (github$) return <_Footer>{github$}; + else if (community$) return <_Footer>{community$}; + else return <_Footer>; +} diff --git a/.codedoc/content/header.tsx b/.codedoc/content/header.tsx new file mode 100644 index 0000000..9ecb780 --- /dev/null +++ b/.codedoc/content/header.tsx @@ -0,0 +1,21 @@ +import { CodedocConfig } from '@codedoc/core'; +import { Header as _Header, GithubButton, Watermark } from '@codedoc/core/components'; + + +export function Header(config: CodedocConfig, renderer: any) { + return ( + <_Header>{config.misc?.github ? + + +

+
+ : ''} + + + ) +} diff --git a/.codedoc/content/index.tsx b/.codedoc/content/index.tsx new file mode 100644 index 0000000..144e869 --- /dev/null +++ b/.codedoc/content/index.tsx @@ -0,0 +1,38 @@ +import { RendererLike } from '@connectv/html'; +import { File } from 'rxline/fs'; +import { Page, Meta, ContentNav, Fonts, ToC, GithubSearch$ } from '@codedoc/core/components'; + +import { config } from '../config'; +import { Header } from './header'; +import { Footer } from './footer'; + + +export function content(_content: HTMLElement, toc: HTMLElement, renderer: RendererLike, file: File) { + return ( + } + fonts={} + + scripts={config.page.scripts} + stylesheets={config.page.stylesheets} + + header={
} + footer={