-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: use @codedoc/cli to generate new docs
- Loading branch information
Showing
82 changed files
with
20,055 additions
and
7,630 deletions.
There are no files selected for viewing
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,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'] | ||
} | ||
}); |
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,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 | ||
} | ||
}, | ||
}); |
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,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$ = <a href={`https://github.com/${config.misc.github.user}/${config.misc.github.repo}/`} | ||
target="_blank">GitHub</a>; | ||
|
||
let community$; | ||
if (config.misc?.gitter) | ||
community$ = <GitterToggle$ room={config.misc.gitter.room}/> | ||
|
||
if (github$ && community$) return <_Footer>{github$}<hr/>{community$}</_Footer>; | ||
else if (github$) return <_Footer>{github$}</_Footer>; | ||
else if (community$) return <_Footer>{community$}</_Footer>; | ||
else return <_Footer><Watermark/></_Footer>; | ||
} |
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,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 ? | ||
<fragment> | ||
<GithubButton action={config.misc.github.action || 'Star'} | ||
repo={config.misc.github.repo} | ||
user={config.misc.github.user} | ||
large={config.misc.github.large === true} | ||
count={config.misc.github.count !== false} | ||
standardIcon={config.misc.github.standardIcon !== false}/> | ||
<br/><br/> | ||
</fragment> | ||
: ''} | ||
<Watermark/> | ||
</_Header> | ||
) | ||
} |
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,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<any, any>, file: File<string>) { | ||
return ( | ||
<Page title={config.page.title.extractor(_content, config, file)} | ||
favicon={config.page.favicon} | ||
meta={<Meta {...config.page.meta}/>} | ||
fonts={<Fonts {...config.page.fonts}/>} | ||
|
||
scripts={config.page.scripts} | ||
stylesheets={config.page.stylesheets} | ||
|
||
header={<Header {...config}/>} | ||
footer={<Footer {...config}/>} | ||
toc={ | ||
<ToC search={ | ||
config.misc?.github ? | ||
<GithubSearch$ | ||
repo={config.misc.github.repo} | ||
user={config.misc.github.user} | ||
root={config.src.base} | ||
pick={config.src.pick.source} | ||
drop={config.src.drop.source} | ||
/> : false | ||
}>{toc}</ToC> | ||
}> | ||
{_content} | ||
<ContentNav content={_content}/> | ||
</Page> | ||
) | ||
} |
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,8 @@ | ||
import { funcTransport } from '@connectv/sdh/transport'; | ||
import { useTheme } from '@codedoc/core/transport'; | ||
|
||
import { theme } from '../theme'; | ||
|
||
|
||
export function installTheme() { useTheme(theme); } | ||
export const installTheme$ = /*#__PURE__*/funcTransport(installTheme); |
Oops, something went wrong.