mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 02:42:41 +02:00
feat(v2): add editUrl option to docs plugin (#1818)
* feat(v2): add editUrl option to docs plugin * nits * misc(v2): nit * misc(v2): nit
This commit is contained in:
parent
aba9edc12c
commit
ae678c9dad
10 changed files with 66 additions and 6 deletions
|
@ -144,6 +144,10 @@ module.exports = {
|
|||
* relative to site dir
|
||||
*/
|
||||
path: 'docs',
|
||||
/**
|
||||
* URL for editing docs, example: 'https://github.com/facebook/docusaurus/edit/master/website/docs/'
|
||||
*/
|
||||
editUrl: 'https://github.com/repo/project/website/docs/',
|
||||
/**
|
||||
* URL route for the blog section of your site
|
||||
* do not include trailing slash
|
||||
|
|
|
@ -265,7 +265,7 @@ module.exports = {
|
|||
|
||||
Deprecated. Create a `CNAME` file in your `static` folder instead. Files in the `static` folder will be copied into the root of the `build` folder during execution of the build command.
|
||||
|
||||
#### `customDocsPath`, `docsUrl`
|
||||
#### `customDocsPath`, `docsUrl`, `editUrl`
|
||||
|
||||
Deprecated. Pass it as an option to `@docusaurus/preset-classic` docs instead:
|
||||
|
||||
|
@ -279,6 +279,8 @@ module.exports = {
|
|||
docs: {
|
||||
// Equivalent to `customDocsPath`.
|
||||
path: 'docs',
|
||||
// Equivalent to `editUrl`
|
||||
editUrl: 'https://github.com/facebook/docusaurus/edit/master/website/docs/',
|
||||
// Equivalent to `docsUrl`.
|
||||
routeBasePath: 'docs',
|
||||
// Remark and Rehype plugins passed to MDX. Replaces `markdownOptions` and `markdownPlugins`.
|
||||
|
@ -321,7 +323,6 @@ module.exports = {
|
|||
### Deprecated fields that may be implemented using a plugin
|
||||
|
||||
- `enableUpdateBy`
|
||||
- `editUrl`
|
||||
- `enableUpdateTime`
|
||||
- `scripts`
|
||||
- `stylesheets`
|
||||
|
|
|
@ -32,6 +32,8 @@ module.exports = {
|
|||
docs: {
|
||||
path: 'docs',
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/edit/master/website/docs/',
|
||||
},
|
||||
blog: {
|
||||
path: '../website-1.x/blog',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue