feat(content-docs): last_update front matter (#7461)

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
dpang314 2022-06-01 10:27:58 -04:00 committed by GitHub
parent a469ae3d63
commit 4f26a1911a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 499 additions and 36 deletions

View file

@ -23,6 +23,14 @@ declare module '@docusaurus/plugin-content-docs' {
image?: string;
};
export type FileChange = {
author?: string;
/** Date can be any
* [parsable date string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
*/
date?: Date | string;
};
/**
* Custom callback for parsing number prefixes from file/folder names.
*/
@ -371,6 +379,8 @@ declare module '@docusaurus/plugin-content-docs' {
pagination_prev?: string | null;
/** Should this doc be excluded from production builds? */
draft?: boolean;
/** Allows overriding the last updated author and/or date. */
last_update?: FileChange;
};
export type LastUpdateData = {