Skip to content

Commit

Permalink
docs: added config and plugin documentation (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
aemmadi committed Aug 19, 2020
1 parent d6a35ff commit ba5792f
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 7 deletions.
83 changes: 79 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,92 @@
# FastDocs
# fastdocs

Automatically generated [Docsify](https://docsify.js.org/#/) flavored documentation sites for your markdown files! We are a README-as-a-Service project, spin up beautiful versions of your documentation in seconds! And the best part? We are completely free and open-source!

## Getting Started
# Getting Started

### Compile your docs
## Compile your docs

To add your repo documentation to FastDocs, you would need to visit `/:user/:repo/compile` first. This allows us to store your `README.md` and add [Docsify](https://docsify.js.org/#/) to render it.

You need to visit this compile endpoint everytime you would like your fastdocs to be updated.

### View your docs
## View your docs

Once you have compiled your docs, you can view and share the pretty version of your docs at `/:user/:repo/`!

That's it, it's that simple and fast!

# Configuration

To add a `description` for SEO purposes, or to add plugins to your documentation, you need to create a `.fastdocs.json` file in the root of your repo.

_Example repo file structure_ :

```text
├── .fastdocs.json
├── build/
├── src/
└── README.md
```

## Config Schema

Once you have made the `.fastdocs.json` file, the currently supported options are:

```json
{
"description": "Description",
"plugins": [],
"gaCode": ""
}
```

### description

The description of your project. Mainly for SEO purposes when docs are linked on platforms like facebook, twitter, linkedin, etc.

- type: string
- default: `"Description"`
- example usage: `"App that sends hello world every 2 seconds"`

### plugins

List of plugins you would like added to your docs. Supported plugins right now:

#### full-text-search

Adds a search bar on the top of the sidebar to quickly search docs.

#### docsify-copy-code

Adds a "Copy to Clipboard" next to code blocks.

#### google-analytics

Support for google analytics. Pass in the google analytics code to [gaCode](#gaCode)

#### emoji

Renders emoji's in your documentation. (Ex: `:100:` would render to :100:)

#### zoom-image

Adds subtle zooming to images cursor is hovering.

---

- type: string array
- default: `[""]`
- example usage: `["docsify-copy-code", "full-text-search"]`

### gaCode

Pass in your google analytics code if you have specified `google-analytics` in the plugins array. This field is optional and can be ignored if it does not apply to you.

- type: string
- default: `""`
- example usage: `"UA-GXXXY"`

# Contribution

Everyone is encouraged to contribute to this project, there are no restrictions other than following the `semantic-commit` conventions. If you want to contribute by reporting bugs, or suggesting new features you are welcome to do so on our [Issue Tracker](https://github.com/MLH-Fellowship/docsify-up/issues)
81 changes: 78 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,91 @@

Automatically generated [Docsify](https://docsify.js.org/#/) flavored documentation sites for your markdown files! We are a README-as-a-Service project, spin up beautiful versions of your documentation in seconds! And the best part? We are completely free and open-source!

## Getting Started
# Getting Started

### Compile your docs
## Compile your docs

To add your repo documentation to FastDocs, you would need to visit `/:user/:repo/compile` first. This allows us to store your `README.md` and add [Docsify](https://docsify.js.org/#/) to render it.

You need to visit this compile endpoint everytime you would like your fastdocs to be updated.

### View your docs
## View your docs

Once you have compiled your docs, you can view and share the pretty version of your docs at `/:user/:repo/`!

That's it, it's that simple and fast!

# Configuration

To add a `description` for SEO purposes, or to add plugins to your documentation, you need to create a `.fastdocs.json` file in the root of your repo.

_Example repo file structure_ :

```text
├── .fastdocs.json
├── build/
├── src/
└── README.md
```

## Config Schema

Once you have made the `.fastdocs.json` file, the currently supported options are:

```json
{
"description": "Description",
"plugins": [],
"gaCode": ""
}
```

### description

The description of your project. Mainly for SEO purposes when docs are linked on platforms like facebook, twitter, linkedin, etc.

- type: string
- default: `"Description"`
- example usage: `"App that sends hello world every 2 seconds"`

### plugins

List of plugins you would like added to your docs. Supported plugins right now:

#### full-text-search

Adds a search bar on the top of the sidebar to quickly search docs.

#### docsify-copy-code

Adds a "Copy to Clipboard" next to code blocks.

#### google-analytics

Support for google analytics. Pass in the google analytics code to [gaCode](#gaCode)

#### emoji

Renders emoji's in your documentation. (Ex: `:100:` would render to :100:)

#### zoom-image

Adds subtle zooming to images cursor is hovering.

---

- type: string array
- default: `[""]`
- example usage: `["docsify-copy-code", "full-text-search"]`

### gaCode

Pass in your google analytics code if you have specified `google-analytics` in the plugins array. This field is optional and can be ignored if it does not apply to you.

- type: string
- default: `""`
- example usage: `"UA-GXXXY"`

# Contribution

Everyone is encouraged to contribute to this project, there are no restrictions other than following the `semantic-commit` conventions. If you want to contribute by reporting bugs, or suggesting new features you are welcome to do so on our [Issue Tracker](https://github.com/MLH-Fellowship/docsify-up/issues)

0 comments on commit ba5792f

Please sign in to comment.