Skip to content

Commit

Permalink
improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RDIL committed Feb 3, 2021
1 parent 9441f47 commit 18399b3
Showing 1 changed file with 35 additions and 10 deletions.
45 changes: 35 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,43 @@
# template-docusaurus-plugin
# docusaurus-plugin-remote-content

A Docusaurus plugin template.
A Docusaurus v2 plugin that downloads content from remote sources.

## Alright, how do I use this?
With this plugin, you can write the Markdown for your **docs** and **blog** somewhere else, and use them on your Docusaurus site.

## Installing

Run this in a terminal:

```bash
yarn add docusaurus-plugin-remote-content
```

## Choosing a Mode

This plugin has 2 modes, and you can choose which to use depending on your needs.

### Constant Sync

This is the default mode.
You will want to gitignore the docs/blog directory that the plugin downloads content to,
as every time you run `docusaurus build` or `docusaurus start`, the content is downloaded,
(and optionally but enabled by default, when it stops, the local copy of the content is deleted).

### CLI Sync

This is the secondary mode. You can use the Docusaurus CLI to update the content when needed.
All you need to do is run `docusaurus download-remote-X`, where X is either `blog` or `docs`.

## Contributing

It isn't really that hard. Follow these simple steps!:

1. Make a new repository using this template.
2. Clone that repository locally using your IDE of choice.
3. Edit `src/index.ts`.
4. Run `yarn build`.
5. Open a second terminal, and make the working directory the `testsite`.
6. Start the test site.
7. You now have the test site running your plugin.
1. Clone a fork of this repository locally using your IDE of choice.
2. Edit the source.
3. Run `yarn build`.
4. Open a second terminal, and make the working directory the `testsite`.
5. Start the test site (`yarn start`).
6. You now have the test site running the plugin.

When you update the plugin, in order to preview your changes on the test site, you need to:

Expand Down

0 comments on commit 18399b3

Please sign in to comment.