From d959a50b5ac8c2455c76cac662703c1e7e11d63a Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Fri, 6 Nov 2020 22:42:00 +0100 Subject: [PATCH 1/3] docs --- .codedoc/build.ts | 15 + .codedoc/config.ts | 24 + .codedoc/content/footer.tsx | 19 + .codedoc/content/header.tsx | 21 + .codedoc/content/index.tsx | 57 + .codedoc/content/theme.ts | 8 + .codedoc/package-lock.json | 4684 ++++++++++++++++++++++++++++ .codedoc/package.json | 5 + .codedoc/serve.ts | 18 + .codedoc/theme.ts | 11 + .codedoc/tsconfig.json | 26 + .codedoc/watch.ts | 22 + {docs/assets => .github}/logo.png | Bin README.md | 2 +- docs/{md => }/_toc.md | 0 docs/backend/available.html | 62 - docs/{md => }/backend/available.md | 0 docs/backend/overview.html | 62 - docs/{md => }/backend/overview.md | 0 docs/cli/backup.html | 62 - docs/{md => }/cli/backup.md | 0 docs/cli/check.html | 62 - docs/{md => }/cli/check.md | 0 docs/cli/cron.html | 62 - docs/{md => }/cli/cron.md | 0 docs/cli/exec.html | 62 - docs/{md => }/cli/exec.md | 0 docs/cli/forget.html | 62 - docs/{md => }/cli/forget.md | 0 docs/cli/info.html | 63 - docs/{md => }/cli/info.md | 0 docs/cli/install copy.html | 56 - docs/cli/install.html | 62 - docs/{md => }/cli/install.md | 0 docs/cli/restore.html | 62 - docs/{md => }/cli/restore.md | 0 docs/cli/uninstall.html | 62 - docs/{md => }/cli/uninstall.md | 0 docs/cli/update.html | 62 - docs/{md => }/cli/update.md | 0 docs/config.html | 62 - docs/{md => }/config.md | 0 docs/contrib.html | 62 - docs/{md => }/contrib.md | 0 docs/dist/codedoc-bundle.entry.js | 40 - docs/dist/codedoc-bundle.js | 32 - docs/dist/codedoc-bundle.meta.json | 106 - docs/dist/codedoc-styles.css | 871 ------ docs/examples.html | 62 - docs/{md => }/examples.md | 0 docs/index.html | 64 - docs/{md => }/index.md | 2 +- docs/installation.html | 62 - docs/{md => }/installation.md | 0 docs/location/cron.html | 64 - docs/{md => }/location/cron.md | 0 docs/location/docker.html | 62 - docs/{md => }/location/docker.md | 0 docs/location/exclude.html | 62 - docs/{md => }/location/exclude.md | 0 docs/location/forget.html | 62 - docs/{md => }/location/forget.md | 0 docs/location/hooks.html | 62 - docs/{md => }/location/hooks.md | 0 docs/location/overview.html | 63 - docs/{md => }/location/overview.md | 0 docs/qa.html | 63 - docs/{md => }/qa.md | 0 docs/quick.html | 62 - docs/{md => }/quick.md | 0 70 files changed, 4912 insertions(+), 2664 deletions(-) create mode 100644 .codedoc/build.ts create mode 100644 .codedoc/config.ts create mode 100644 .codedoc/content/footer.tsx create mode 100644 .codedoc/content/header.tsx create mode 100644 .codedoc/content/index.tsx create mode 100644 .codedoc/content/theme.ts create mode 100644 .codedoc/package-lock.json create mode 100644 .codedoc/package.json create mode 100644 .codedoc/serve.ts create mode 100644 .codedoc/theme.ts create mode 100644 .codedoc/tsconfig.json create mode 100644 .codedoc/watch.ts rename {docs/assets => .github}/logo.png (100%) rename docs/{md => }/_toc.md (100%) delete mode 100644 docs/backend/available.html rename docs/{md => }/backend/available.md (100%) delete mode 100644 docs/backend/overview.html rename docs/{md => }/backend/overview.md (100%) delete mode 100644 docs/cli/backup.html rename docs/{md => }/cli/backup.md (100%) delete mode 100644 docs/cli/check.html rename docs/{md => }/cli/check.md (100%) delete mode 100644 docs/cli/cron.html rename docs/{md => }/cli/cron.md (100%) delete mode 100644 docs/cli/exec.html rename docs/{md => }/cli/exec.md (100%) delete mode 100644 docs/cli/forget.html rename docs/{md => }/cli/forget.md (100%) delete mode 100644 docs/cli/info.html rename docs/{md => }/cli/info.md (100%) delete mode 100644 docs/cli/install copy.html delete mode 100644 docs/cli/install.html rename docs/{md => }/cli/install.md (100%) delete mode 100644 docs/cli/restore.html rename docs/{md => }/cli/restore.md (100%) delete mode 100644 docs/cli/uninstall.html rename docs/{md => }/cli/uninstall.md (100%) delete mode 100644 docs/cli/update.html rename docs/{md => }/cli/update.md (100%) delete mode 100644 docs/config.html rename docs/{md => }/config.md (100%) delete mode 100644 docs/contrib.html rename docs/{md => }/contrib.md (100%) delete mode 100644 docs/dist/codedoc-bundle.entry.js delete mode 100644 docs/dist/codedoc-bundle.js delete mode 100644 docs/dist/codedoc-bundle.meta.json delete mode 100644 docs/dist/codedoc-styles.css delete mode 100644 docs/examples.html rename docs/{md => }/examples.md (100%) delete mode 100644 docs/index.html rename docs/{md => }/index.md (98%) delete mode 100644 docs/installation.html rename docs/{md => }/installation.md (100%) delete mode 100644 docs/location/cron.html rename docs/{md => }/location/cron.md (100%) delete mode 100644 docs/location/docker.html rename docs/{md => }/location/docker.md (100%) delete mode 100644 docs/location/exclude.html rename docs/{md => }/location/exclude.md (100%) delete mode 100644 docs/location/forget.html rename docs/{md => }/location/forget.md (100%) delete mode 100644 docs/location/hooks.html rename docs/{md => }/location/hooks.md (100%) delete mode 100644 docs/location/overview.html rename docs/{md => }/location/overview.md (100%) delete mode 100644 docs/qa.html rename docs/{md => }/qa.md (100%) delete mode 100644 docs/quick.html rename docs/{md => }/quick.md (100%) 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={