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..72f0092 --- /dev/null +++ b/.codedoc/config.ts @@ -0,0 +1,24 @@ +import { configuration } from '@codedoc/core' + +export const config = configuration({ + src: { + base: 'docs', + }, + dest: { + html: './build', + assets: './build', + bundle: './_', + styles: './_', + }, + page: { + title: { + base: 'Autorestic', + }, + }, + misc: { + github: { + user: 'cupcakearmy', + repo: 'autorestic', + }, + }, +}) 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..2f041c2 --- /dev/null +++ b/.codedoc/content/index.tsx @@ -0,0 +1,57 @@ +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={