-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Showing
10 changed files
with
143 additions
and
22 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
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
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 |
---|---|---|
@@ -1,2 +1,7 @@ | ||
// Convert back slash to slash | ||
// @ts-check | ||
|
||
/** | ||
* Convert back slash to slash | ||
* @param {string} input | ||
*/ | ||
module.exports = input => input && input.replace(/\\/g, '/') |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const ora = require('ora') | ||
// @ts-check | ||
const ora = require('ora').default | ||
|
||
module.exports = ora() |
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
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
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
Empty file.
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,89 @@ | ||
declare module 'saber' { | ||
interface Config { | ||
siteConfig?: { | ||
[k: string]: any | ||
} | ||
|
||
themeConfig?: { | ||
[k: string]: any | ||
} | ||
|
||
permalinks?: Permalinks | ((page: Page) => Permalinks) | ||
|
||
build?: { | ||
/** | ||
* The base URL your application will be deployed at. | ||
* If your website is located at a sub directory, e.g. `https://example.com/blog`, you should set this option to `/blog/` (trailing slash is optional). | ||
*/ | ||
publicUrl?: string | ||
} | ||
|
||
plugins?: Plugin[] | ||
|
||
markdown?: { | ||
/** | ||
* The path to a module or npm package name that slugifies the markdown headers. | ||
* The module should have following signature: | ||
* ```js | ||
* type Slugify = (header: string) => string | ||
* ``` | ||
* You can use the package `limax` which provides CJK support. | ||
*/ | ||
slugify?: string | ||
/** | ||
* The path to a file or npm package name that highlights code blocks in markdown. | ||
* `saber-highlighter-` prefix is optional. | ||
* Note that a highlighter will only tokenize the code, you need to add corresponding CSS yourself. | ||
*/ | ||
highlighter?: string | ||
/** | ||
* Options for markdown-it | ||
*/ | ||
options?: any | ||
plugins?: MarkdownItPlugin[] | ||
} | ||
} | ||
|
||
interface Permalinks { | ||
[pageType: string]: string | ||
} | ||
|
||
interface Page { | ||
attributes: { | ||
type: string | ||
layout?: string | ||
createdAt: Date | ||
updatedAt: Date | ||
permalink: string | ||
slug: string | ||
[k: string]: any | ||
} | ||
internal: { | ||
id: string | ||
isFile?: boolean | ||
relative?: string | ||
absolute?: string | ||
saved?: boolean | ||
} | ||
content?: string | ||
contentType?: string | ||
} | ||
|
||
type Plugin = | ||
| string | ||
| { | ||
/** The path to your plugin or an npm package name */ | ||
resolve: string | ||
/** Plugin options */ | ||
options?: object | ||
} | ||
|
||
interface MarkdownItPlugin { | ||
// A package name or relative path | ||
// e.g. markdown-it-footnote | ||
resolve: string | ||
options?: any | ||
} | ||
|
||
export { Config, Permalinks } | ||
} |
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