1
0
Fork 0

hide reading time

This commit is contained in:
Lucas 2024-01-18 18:13:10 +01:00
parent f63887f564
commit 73ce337a03
3 changed files with 17 additions and 6 deletions

@ -1 +1 @@
Subproject commit dfb8464c3e25b23cc01f4d2e82e21f4c7234284d
Subproject commit e9762c3f400dd60140a8b4912d7bd9d7b8bcd6cd

View file

@ -16,9 +16,13 @@ export const sharedPageComponents: SharedLayout = {
// components for pages that display a single page (e.g. a single note)
export const defaultContentPageLayout: PageLayout = {
beforeBody: [
Component.Breadcrumbs(),
Component.Breadcrumbs({
showCurrentPage: false,
}),
Component.ArticleTitle(),
Component.ContentMeta(),
Component.ContentMeta({
hideReadingTime: true,
}),
Component.TagList(),
],
left: [
@ -37,7 +41,15 @@ export const defaultContentPageLayout: PageLayout = {
// components for pages that display lists of pages (e.g. tags or folders)
export const defaultListPageLayout: PageLayout = {
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
beforeBody: [
Component.Breadcrumbs({
showCurrentPage: false,
}),
Component.ArticleTitle(),
Component.ContentMeta({
hideReadingTime: true,
}),
],
left: [
Component.PageTitle(),
Component.MobileOnly(Component.Spacer()),

View file

@ -15,7 +15,7 @@ interface ContentMetaOptions {
}
const defaultOptions: ContentMetaOptions = {
showReadingTime: true,
showReadingTime: false,
showComma: true,
}
@ -33,7 +33,6 @@ export default ((opts?: Partial<ContentMetaOptions>) => {
segments.push(formatDate(getDate(cfg, fileData)!, cfg.locale))
}
if (enabled !== false) {
// Display reading time if enabled
if (options.showReadingTime) {
const { minutes, words: _words } = readingTime(text)