Skip to content

Commit

Permalink
Simplify the page title further
Browse files Browse the repository at this point in the history
  • Loading branch information
bitspittle committed Feb 27, 2025
1 parent a99b5df commit 25f338b
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,7 @@ fun DocsLayout(content: @Composable () -> Unit) {
val ctx = rememberPageContext()

val articleHandle = ctx.markdown?.let { ctx.route.toArticleHandle() }
val title = buildList {
if (articleHandle != null) {
articleHandle.article.title.takeIf { it.isNotEmpty() }?.let { add(it) }
articleHandle.subcategory.title.takeIf { it.isNotEmpty() }?.let { add(it) }
articleHandle.category.title.takeIf { it.isNotEmpty() }?.let { add(it) }
}

if (this.isEmpty()) {
add("Docs")
}
}.joinToString(" - ")
val title = articleHandle?.article?.titleOrFallback?.takeIf { it.isNotEmpty() } ?: "Docs"

PageLayout(title) {
MobileLocalNav()
Expand Down

0 comments on commit 25f338b

Please sign in to comment.