Skip to content

Commit f684c16

Browse files
authored
docs: configure edit url link (#3715)
1 parent c0f9d41 commit f684c16

File tree

1 file changed

+30
-20
lines changed

1 file changed

+30
-20
lines changed

docs/docusaurus.config.js

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ const config = {
5858
libsRootDir: path.join(__dirname, '..', 'src', 'components'),
5959
pages: {
6060
ActivityIndicator: 'ActivityIndicator',
61-
AnimatedFAB: 'FAB/AnimatedFAB',
6261
Appbar: {
6362
Appbar: 'Appbar/Appbar',
6463
AppbarAction: 'Appbar/AppbarAction',
@@ -73,8 +72,12 @@ const config = {
7372
},
7473
Badge: 'Badge',
7574
Banner: 'Banner',
76-
BottomNavigation: 'BottomNavigation/BottomNavigation',
77-
Button: 'Button/Button',
75+
BottomNavigation: {
76+
BottomNavigation: 'BottomNavigation/BottomNavigation',
77+
},
78+
Button: {
79+
Button: 'Button/Button',
80+
},
7881
Card: {
7982
Card: 'Card/Card',
8083
CardActions: 'Card/CardActions',
@@ -88,7 +91,9 @@ const config = {
8891
CheckboxIOS: 'Checkbox/CheckboxIOS',
8992
CheckboxItem: 'Checkbox/CheckboxItem',
9093
},
91-
Chip: 'Chip/Chip',
94+
Chip: {
95+
Chip: 'Chip/Chip',
96+
},
9297
DataTable: {
9398
DataTable: 'DataTable/DataTable',
9499
DataTableCell: 'DataTable/DataTableCell',
@@ -113,10 +118,13 @@ const config = {
113118
},
114119
FAB: {
115120
FAB: 'FAB/FAB',
121+
AnimatedFAB: 'FAB/AnimatedFAB',
116122
FABGroup: 'FAB/FABGroup',
117123
},
118124
HelperText: 'HelperText',
119-
IconButton: 'IconButton/IconButton',
125+
IconButton: {
126+
IconButton: 'IconButton/IconButton',
127+
},
120128
List: {
121129
ListAccordion: 'List/ListAccordion',
122130
ListAccordionGroup: 'List/ListAccordionGroup',
@@ -143,10 +151,14 @@ const config = {
143151
RadioButtonItem: 'RadioButton/RadioButtonItem',
144152
},
145153
Searchbar: 'Searchbar',
146-
SegmentedButtons: 'SegmentedButtons/SegmentedButtons',
154+
SegmentedButtons: {
155+
SegmentedButtons: 'SegmentedButtons/SegmentedButtons',
156+
},
147157
Snackbar: 'Snackbar',
148158
Surface: 'Surface',
149-
Switch: 'Switch/Switch',
159+
Switch: {
160+
Switch: 'Switch/Switch',
161+
},
150162
TextInput: {
151163
TextInput: 'TextInput/TextInput',
152164
TextInputAffix: 'TextInput/Adornment/TextInputAffix',
@@ -157,8 +169,12 @@ const config = {
157169
ToggleButtonGroup: 'ToggleButton/ToggleButtonGroup',
158170
ToggleButtonRow: 'ToggleButton/ToggleButtonRow',
159171
},
160-
Tooltip: 'Tooltip/Tooltip',
161-
TouchableRipple: 'TouchableRipple/TouchableRipple',
172+
Tooltip: {
173+
Tooltip: 'Tooltip/Tooltip',
174+
},
175+
TouchableRipple: {
176+
TouchableRipple: 'TouchableRipple/TouchableRipple',
177+
},
162178
Typography: {
163179
Text: 'Typography/Text',
164180
},
@@ -175,21 +191,15 @@ const config = {
175191
({
176192
docs: {
177193
sidebarPath: require.resolve('./sidebars.js'),
178-
// Please change this to your repo.
179-
// Remove this to remove the "edit this page" links.
180-
editUrl:
181-
'https://github.com/callstack/react-native-paper/tree/main/docs/',
194+
editUrl: (params) =>
195+
`https://github.com/callstack/react-native-paper/tree/main/src/${params.docPath.replace(
196+
'mdx',
197+
'tsx'
198+
)}`,
182199
remarkPlugins: [
183200
[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }],
184201
],
185202
},
186-
blog: {
187-
showReadingTime: true,
188-
// Please change this to your repo.
189-
// Remove this to remove the "edit this page" links.
190-
editUrl:
191-
'https://github.com/callstack/react-native-paper/tree/main/docs/',
192-
},
193203
theme: {
194204
customCss: require.resolve('./src/css/custom.css'),
195205
},

0 commit comments

Comments
 (0)