diff --git a/src/client/theme-default/components/VPDocFooterLastUpdated.vue b/src/client/theme-default/components/VPDocFooterLastUpdated.vue
index 1ac29682bb9f..30c047d15708 100644
--- a/src/client/theme-default/components/VPDocFooterLastUpdated.vue
+++ b/src/client/theme-default/components/VPDocFooterLastUpdated.vue
@@ -20,7 +20,7 @@ onMounted(() => {
- {{ theme.translations?.lastUpdatedText || 'Last updated' }}:
+ {{ theme.lastUpdatedText || 'Last updated' }}:
diff --git a/src/client/theme-default/composables/outline.ts b/src/client/theme-default/composables/outline.ts
index 9467d0f1cbae..9ddfec282889 100644
--- a/src/client/theme-default/composables/outline.ts
+++ b/src/client/theme-default/composables/outline.ts
@@ -30,8 +30,13 @@ export function getHeaders(pageOutline: DefaultTheme.Config['outline']) {
export function resolveHeaders(
headers: MenuItem[],
- levelsRange: Exclude
= 2
+ range?: Exclude
) {
+ const levelsRange =
+ (typeof range === 'object' && !Array.isArray(range)
+ ? range.level
+ : range) || 2
+
const levels: [number, number] =
typeof levelsRange === 'number'
? [levelsRange, levelsRange]
diff --git a/types/default-theme.d.ts b/types/default-theme.d.ts
index 041a091822af..aea08cb6a11e 100644
--- a/types/default-theme.d.ts
+++ b/types/default-theme.d.ts
@@ -18,7 +18,17 @@ export namespace DefaultTheme {
*
* @default 2
*/
- outline?: number | [number, number] | 'deep' | false
+ outline?: Outline | Outline['level'] | false
+
+ /**
+ * @deprecated
+ * Use `outline.title` instead.
+ *
+ * Custom outline title in the aside component.
+ *
+ * @default 'On this page'
+ */
+ outlineTitle?: string
/**
* The nav items.
@@ -36,6 +46,18 @@ export namespace DefaultTheme {
*/
editLink?: EditLink
+ /**
+ * Set custom last updated text.
+ *
+ * @default 'Last updated'
+ */
+ lastUpdatedText?: string
+
+ /**
+ * Set custom prev/next labels.
+ */
+ docFooter?: DocFooter
+
/**
* The social links to be displayed at the end of the nav bar. Perfect for
* placing links to social services such as GitHub, Twitter, Facebook, etc.
@@ -61,28 +83,6 @@ export namespace DefaultTheme {
* Custom labels
*/
translations?: {
- /**
- * @default 'On this page'
- */
- outlineTitle?: string
-
- /**
- * @default 'Last updated'
- */
- lastUpdatedText?: string
-
- docFooter?: {
- /**
- * @default 'Previous page'
- */
- prev?: string
-
- /**
- * @default 'Next page'
- */
- next?: string
- }
-
/**
* @default 'Appearance'
*/
@@ -185,6 +185,24 @@ export namespace DefaultTheme {
text?: string
}
+ // prev-next -----------------------------------------------------------------
+
+ export interface DocFooter {
+ /**
+ * Custom label for previous page button.
+ *
+ * @default 'Previous page'
+ */
+ prev?: string
+
+ /**
+ * Custom label for next page button.
+ *
+ * @default 'Next page'
+ */
+ next?: string
+ }
+
// social link ---------------------------------------------------------------
export interface SocialLink {
@@ -223,6 +241,13 @@ export namespace DefaultTheme {
sponsor?: string
}
+ // outline -------------------------------------------------------------------
+
+ export interface Outline {
+ level?: number | [number, number] | 'deep'
+ title?: string
+ }
+
// algolia ------------------------------------------------------------------
/**