@@ -64,9 +64,6 @@ const defaultDocsifyConfig = () => ({
6464
6565 // Deprecations //////////////////
6666
67- /** @deprecated */
68- topMargin : 0 ,
69-
7067 /** @deprecated */
7168 get themeColor ( ) {
7269 return this . __themeColor ;
@@ -78,17 +75,40 @@ const defaultDocsifyConfig = () => ({
7875 // eslint-disable-next-line no-console
7976 console . warn (
8077 stripIndent ( `
81- $docsify.themeColor is deprecated. Use the "--theme-color" theme property to set your theme color.
82- <style>
83- :root {
84- --theme-color: deeppink;
85- }
86- </style>
87- ` ) . trim ( ) ,
78+ $docsify.themeColor is deprecated as of v5 . Use the "--theme-color" CSS property to customize your theme color.
79+ <style>
80+ :root {
81+ --theme-color: deeppink;
82+ }
83+ </style>
84+ ` ) . trim ( ) ,
8885 ) ;
8986 }
9087 } ,
9188 __themeColor : '' ,
89+
90+ /** @deprecated */
91+ get topMargin ( ) {
92+ return this . __topMargin ;
93+ } ,
94+ set topMargin ( value ) {
95+ if ( value ) {
96+ this . __topMargin = value ;
97+
98+ // eslint-disable-next-line no-console
99+ console . warn (
100+ stripIndent ( `
101+ $docsify.topMargin is deprecated as of v5. Use the "--scroll-padding-top" CSS property to specify a scroll margin when using a sticky navbar.
102+ <style>
103+ :root {
104+ --scroll-padding-top: 10px;
105+ }
106+ </style>
107+ ` ) . trim ( ) ,
108+ ) ;
109+ }
110+ } ,
111+ __topMargin : 0 ,
92112} ) ;
93113
94114/** @typedef {ReturnType<typeof defaultDocsifyConfig> } DocsifyConfig */
@@ -100,14 +120,13 @@ const defaultDocsifyConfig = () => ({
100120 */
101121export default function ( vm , config = { } ) {
102122 if ( window . $docsify ) {
123+ // eslint-disable-next-line no-console
103124 console . warn (
104125 'DEPRECATION: The global $docsify config variable is deprecated. See the latest getting started docs. https://docsify.js.org/#/quickstart' ,
105126 ) ;
106127 }
107128
108129 config = Object . assign (
109- { } ,
110-
111130 defaultDocsifyConfig ( ) ,
112131
113132 // Handle non-function configs no matter what (f.e. plugins assign options onto it)
@@ -156,6 +175,7 @@ export default function (vm, config = {}) {
156175 const val = script . getAttribute ( 'data-' + hyphenate ( prop ) ) ;
157176
158177 if ( isPrimitive ( val ) ) {
178+ // eslint-disable-next-line no-console
159179 console . warn (
160180 `DEPRECATION: data-* attributes on the docsify global script (f.e. ${
161181 'data-' + hyphenate ( prop )
0 commit comments