hide reading time
This commit is contained in:
parent
f63887f564
commit
73ce337a03
3 changed files with 17 additions and 6 deletions
2
content
2
content
|
@ -1 +1 @@
|
||||||
Subproject commit dfb8464c3e25b23cc01f4d2e82e21f4c7234284d
|
Subproject commit e9762c3f400dd60140a8b4912d7bd9d7b8bcd6cd
|
|
@ -16,9 +16,13 @@ export const sharedPageComponents: SharedLayout = {
|
||||||
// components for pages that display a single page (e.g. a single note)
|
// components for pages that display a single page (e.g. a single note)
|
||||||
export const defaultContentPageLayout: PageLayout = {
|
export const defaultContentPageLayout: PageLayout = {
|
||||||
beforeBody: [
|
beforeBody: [
|
||||||
Component.Breadcrumbs(),
|
Component.Breadcrumbs({
|
||||||
|
showCurrentPage: false,
|
||||||
|
}),
|
||||||
Component.ArticleTitle(),
|
Component.ArticleTitle(),
|
||||||
Component.ContentMeta(),
|
Component.ContentMeta({
|
||||||
|
hideReadingTime: true,
|
||||||
|
}),
|
||||||
Component.TagList(),
|
Component.TagList(),
|
||||||
],
|
],
|
||||||
left: [
|
left: [
|
||||||
|
@ -37,7 +41,15 @@ export const defaultContentPageLayout: PageLayout = {
|
||||||
|
|
||||||
// components for pages that display lists of pages (e.g. tags or folders)
|
// components for pages that display lists of pages (e.g. tags or folders)
|
||||||
export const defaultListPageLayout: PageLayout = {
|
export const defaultListPageLayout: PageLayout = {
|
||||||
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
|
beforeBody: [
|
||||||
|
Component.Breadcrumbs({
|
||||||
|
showCurrentPage: false,
|
||||||
|
}),
|
||||||
|
Component.ArticleTitle(),
|
||||||
|
Component.ContentMeta({
|
||||||
|
hideReadingTime: true,
|
||||||
|
}),
|
||||||
|
],
|
||||||
left: [
|
left: [
|
||||||
Component.PageTitle(),
|
Component.PageTitle(),
|
||||||
Component.MobileOnly(Component.Spacer()),
|
Component.MobileOnly(Component.Spacer()),
|
||||||
|
|
|
@ -15,7 +15,7 @@ interface ContentMetaOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultOptions: ContentMetaOptions = {
|
const defaultOptions: ContentMetaOptions = {
|
||||||
showReadingTime: true,
|
showReadingTime: false,
|
||||||
showComma: true,
|
showComma: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@ export default ((opts?: Partial<ContentMetaOptions>) => {
|
||||||
segments.push(formatDate(getDate(cfg, fileData)!, cfg.locale))
|
segments.push(formatDate(getDate(cfg, fileData)!, cfg.locale))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enabled !== false) {
|
|
||||||
// Display reading time if enabled
|
// Display reading time if enabled
|
||||||
if (options.showReadingTime) {
|
if (options.showReadingTime) {
|
||||||
const { minutes, words: _words } = readingTime(text)
|
const { minutes, words: _words } = readingTime(text)
|
||||||
|
|
Loading…
Reference in a new issue