generated from CONNECT-platform/coding-blog-boilerplate
-
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.
- Loading branch information
0 parents
commit 428af62
Showing
24 changed files
with
5,448 additions
and
0 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,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' | ||
} | ||
} | ||
}); |
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,7 @@ | ||
import { CodedocConfig } from '@codedoc/core'; | ||
import { Footer as _Footer } from '@codedoc/core/components'; | ||
|
||
|
||
export function Footer(config: CodedocConfig, renderer: any) { | ||
return <_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,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> | ||
) | ||
} |
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,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> | ||
) | ||
} |
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.