mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-22 12:37:58 +02:00
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:
parent
a469ae3d63
commit
4f26a1911a
15 changed files with 499 additions and 36 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue