Skip to content

AdamEunson/docusaurus-plugin-docs-editor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docs Editor

A Markdown editor for Docusaurus content using GitHub to commit any progress and allow contributers to create a pull request to the upstream repository without the need to know Markdown or GitHub.

WORK IN PROGRESS: This project is in early development so expect functionality to be broken!

Usage

Add this plugin to your project:

yarn add jlvandenhout/docusaurus-plugin-docs-editor

Then enable the plugin in your Docusaurus configuration:

module.exports = {
  ...
  plugins: [
    [
      '@jlvandenhout/docusaurus-plugin-docs-editor',
      {
        // The path to the docs section in your repository
        docsPath: 'example/docs',

        // GitHub OAuth Application settings
        github: {
          clientId: '[GITHUB_CLIENT_ID]',
          tokenUrl: '[GITHUB_TOKEN_URI]'
        }
      }
    ]
  ]
};

Example

To run the example webpage, you will need to set up a GitHub OAuth App to let users authorize your app and a server that manages your Client Secret and allows users to swap their authorization code for an access token (have a look at Gatekeeper how to do that).

Then navigate to the example directory and start the development server with the CLIENT_ID and TOKEN_URL environment variables set to the Client ID you received from GitHub and the URL to your authorization server:

cd example
CLIENT_ID=12345 TOKEN_URL=http://example.com yarn start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.3%
  • CSS 11.7%