Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMcCulloh committed Jun 23, 2020
0 parents commit 428af62
Show file tree
Hide file tree
Showing 24 changed files with 5,448 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .codedoc/build.ts
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']
}
});
41 changes: 41 additions & 0 deletions .codedoc/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

import { configuration } from '@codedoc/core';
import { codingBlog } from '@codedoc/coding-blog-plugin';

import { theme } from './theme';



export const config = /*#__PURE__*/configuration({
theme,
src: {
base: 'posts'
},
dest: {
namespace: '/coding-blog-boilerplate', // --> change this if you want to also deploy to GitHub Pages
html: 'dist',
assets: process.env.GITHUB_BUILD === 'true' ? 'dist' : '.',
bundle: process.env.GITHUB_BUILD === 'true' ? 'bundle' : 'dist/bundle',
styles: process.env.GITHUB_BUILD === 'true' ? 'styles' : 'dist/styles',
},
page: {
title: {
base: 'Coding Blog Boilerplate' // --> change this to change your blog's title
},
favicon: '/favicon.ico'
},
plugins: [
codingBlog({
assets: [
'img',
'favicon.ico',
]
})
],
misc: {
github: {
repo: 'coding-blog-boilerplate',
user: 'CONNECT-platform'
}
}
});
7 changes: 7 additions & 0 deletions .codedoc/content/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { CodedocConfig } from '@codedoc/core';
import { Footer as _Footer } from '@codedoc/core/components';


export function Footer(config: CodedocConfig, renderer: any) {
return <_Footer/>;
}
12 changes: 12 additions & 0 deletions .codedoc/content/header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { CodedocConfig } from '@codedoc/core';
import { Header as _Header } from '@codedoc/core/components';
import { Watermark } from '@codedoc/coding-blog-plugin/dist/es5/components';


export function Header(config: CodedocConfig, renderer: any) {
return (
<_Header>
<Watermark/>
</_Header>
)
}
27 changes: 27 additions & 0 deletions .codedoc/content/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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>{toc}</ToC>}>
{_content}
<ContentNav content={_content}/>
</Page>
)
}
8 changes: 8 additions & 0 deletions .codedoc/content/theme.ts
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);
Loading

0 comments on commit 428af62

Please sign in to comment.