jc-marked
Version:
Markdown AST (Abstract syntax tree) parser based on finite-state machine (FSM).
59 lines (55 loc) • 2.4 kB
TypeScript
/*! *****************************************************************************
Copyright (c) 2023 李俊才 All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
import { AuthorInfos, ArticleInfos, AuthorName, AticleTitle, articleInfos } from "..";
/**
* 设置作者
* 可以仅仅设置一个字符串作为用户名,也可以指定一个完整的用户信息:
* @example
* ```ts
* setAuthor({Jack Lee"})
* ```
* @example
* ```ts
* setAuthor({
* name: "Jack Lee",
* email: "a291148484@outlook.com",
* homepage: "thispae.tech",
* phone: 123456789
* })
* ```
*/
declare function setAuthor(author: AuthorName | AuthorInfos): boolean;
/** 设置标题 */
declare function setTitle(title: string): void;
/** 设置副标题 */
declare function setSubTitle(title: string): void;
/** 设置 summary */
declare function setSummary(summary: string): void;
/** 设置上一篇文章 */
declare function setLastArticle(title: AticleTitle, url?: string): void;
/** 设置下一篇文章 */
declare function setNextArticle(title: AticleTitle, url?: string): void;
/**
* 设置文章标签
* @param tags 一个表示一组标签值的字符串数组
*/
declare function setTags(tags: string[]): void;
declare function getAuthor(): AuthorInfos;
declare function getTitle(): string;
declare function getSubtitle(): string;
declare function getSummary(): string;
declare function getLastArticle(): ArticleInfos;
declare function getNextArticle(): ArticleInfos;
declare function getTags(): string[];
declare function getExtraInfos(): articleInfos;
export { setAuthor, setTitle, setSubTitle, setSummary, setLastArticle, setNextArticle, setTags, getAuthor, getTitle, getSubtitle, getSummary, getLastArticle, getNextArticle, getTags, getExtraInfos, };