Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maya Shavin committed Nov 5, 2020
1 parent 996bd8e commit 6887be3
Show file tree
Hide file tree
Showing 77 changed files with 14,128 additions and 19 deletions.
18 changes: 18 additions & 0 deletions docs/.forestry/front_matter/templates/documentation-page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
label: Documentation Page
hide_body: false
fields:
- type: text
name: title
label: title
- type: datetime
name: date
label: date
config:
date_format: MM/DD/YYYY
export_format: YYYY-MM-DD
- type: text
name: slug
label: slug
pages:
- docs/editing-in-forestry.md
32 changes: 32 additions & 0 deletions docs/.forestry/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
new_page_extension: md
auto_deploy: false
admin_path: ''
webhook_url:
sections:
- type: heading
label: Content
- type: directory
path: docs
label: Docs
create: all
match: "**/*"
templates:
- documentation-page
- type: heading
label: Settings
- type: document
path: data/settings.json
label: Menu
upload_dir: static
public_path: ''
front_matter_path: ''
use_front_matter_path: false
file_template: ":filename:"
build:
preview_output_directory: dist
install_dependencies_command: yarn
preview_docker_image: node:12
mount_path: "/srv"
working_dir: "/srv"
instant_preview_command: yarn develop
12 changes: 12 additions & 0 deletions docs/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: mayashavin
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: https://www.buymeacoffee.com/VTLRKH6
9 changes: 9 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.log
.cache
.DS_Store
src/.temp
node_modules
dist
.env
.env.*
.netlify
21 changes: 21 additions & 0 deletions docs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Samuel Horn af Rantzien

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
59 changes: 59 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/de44d168-eb1d-47a5-8731-d77bb40af7c8/deploy-status)](https://app.netlify.com/sites/jamdocs/deploys)

# ![Jamdocs](https://github.com/samuelhorn/jamdocs/blob/master/src/assets/img/logo-dark.svg)

The ultimate static generated documentation theme for the JAM-stack. Highly customizable, based on Gridsome, ready to deploy to Netlify in one click. [DEMO](https://jamdocs.samuelhorn.com/)

_Beware, Jamdocs is still in heavy development and will probably change a lot in the near future. And the docs for it is still not completed._

## Fast by default

Jamdocs is optimized to be as fast as possible, right now generating 100/100/100/100 score in Google Lighthouse. And 100/100 score in Google Page Speed Insights.

![100/100/100/100 Lighthouse scores](https://github.com/samuelhorn/jamdocs/blob/master/src/assets/img/pagespeed.png)

## Local installation for development

1. `git clone https://github.com/samuelhorn/jamdocs project-name`.
2. `cd project-name`
3. `gridsome develop`.

## Deploy to Netlify

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/samuelhorn/jamdocs)

## Import to Forestry CMS

[![](https://assets.forestry.io/import-to-forestryK.svg)](https://app.forestry.io/quick-start?repo=samuelhorn/jamdocs&engine=other "Import to Forestry")

This project has been pre-configured to work with [Forestry](https://forestry.io). Any changes you make in Forestry will be commited back to your repo. ✨

![Forestry documentation in JAMdocs](static/screenshor-forestry-preview.png)

## Setup & configuration

See the [demo](https://jamdocs.samuelhorn.com/), which is also the documentation, obviously!

## Todos

1. Improve the actual documentation for Jamdocs, in Jamdocs :)
2. ~~Build the homepage better, dividing stuff into components and so on.~~
3. Implement Algolia search.
4. ~~Add a link to this repository from the demo.~~

## Credits

* Creds to the [Netlify](https://www.netlify.com/) team for making an awesome all in one hosting soluiton for the JAM-stack.
* Creds to the [Gridsome](https://gridsome.org/) team for developing a great foundation to build static sites.
* Creds to [Evan You](https://twitter.com/youyuxi) for making [Vue](https://vuejs.org/).
* Creds to [Cole Bemis](https://twitter.com/colebemis) for making [feathericons](https://feathericons.com/), my favourite icon set.
* Creds to [Egoist](https://github.com/egoist), who's not that egoistic. Because he made [vue-feather-icons](https://github.com/egoist/vue-feather-icons).
* Creds to [Forestry](https://forestry.io/) for finalizing the Forestry configuration and writing about it in the docs, adding their great headless CMS to the mix.

## License

[MIT](https://github.com/samuelhorn/jamdocs/blob/master/LICENSE)

## Finally

Enjoy Jamdocs, and if you like and use this project commercially, please consider sponsoring on Github since I have put a lot of spare time into this.
26 changes: 26 additions & 0 deletions docs/data/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"sidebar": [
{
"section": "Introduction",
"topics": [
{
"title": "Getting started",
"slug": "getting-started"
}
]
},
{
"section": "Setup",
"topics": [
{
"title": "Theme configuration",
"slug": "theme-configuration"
},
{
"title": "Forestry CMS",
"slug": "forestry-cms"
}
]
}
]
}
188 changes: 188 additions & 0 deletions docs/docs/general-plugin/configurations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
---
title: Options
slug: image-optimizer-options
category: Image Optimizer Plugin
position: 2
---

To set configurations for Cloudinary source plugin, we use inner `options` section of the `gridsome-plugin-cloudinary` in `gridsome.config.js`.

The list of available options are shown as below

### `cloudName` - Required

* Type: `String`
* `required`

The cloud name associated with your Cloudinary account. It is used to configure and enable Cloudinary features such as generating delivery asset URL.

```js
/* gridsome.config.js */

export default {
plugins: [
{
use: 'gridsome-plugin-cloudinary',
options: {
cloudName: 'your-cloud-name'
}
},
]
}
```

Cloud name presents in every delivered URL from Cloudinary, hence it's important to have it configured correctly.

You can find your cloud name details in **Dashboard** page, or in **Account Settings** page in [Cloudinary console](https://cloudinary.com/console)

### `apiKey` - Required

* Type: `String`
* `required`

The API Key associated with your Cloudinary account. It is used together with `apiSecret` to query images and videos from your Cloudinary account to GraphQL Data Layer.

```js
/* gridsome.config.js */

export default {
plugins: [
{
use: 'gridsome-plugin-cloudinary',
options: {
apiKey: 'your-api-key'
}
},
]
}
```

You can find your API Key in your **Cloudinary Dashboard** page, or in **Settings/Security** page in [Cloudinary console](https://cloudinary.com/console)

![How to find apiKey in Cloudinary Console](https://res.cloudinary.com/mayashavin/image/upload/f_auto,q_auto,w_730/v1601805482/nuxt-cld/apikey)

**Warning** These private keys should be kept as environment variables in `.env`.

## `apiSecret` - Required

* Type: `String`
* `required`

The API Secret Key associated with your Cloudinary account. It is used together with `apiKey` to query images and videos from your Cloudinary account to GraphQL Data Layer.

```js
/* gridsome.config.js */

export default {
plugins: [
{
use: 'gridsome-plugin-cloudinary',
options: {
apiSecret: 'your-api-secret-key'
}
}
]
}
```

You can find your API Secret Key in your **Cloudinary Dashboard** page, or in **Settings/Security** page in [Cloudinary console](https://cloudinary.com/console).

![How to find apiSecret in Cloudinary Console](https://res.cloudinary.com/mayashavin/image/upload/f_auto,q_auto,w_730/v1601805482/nuxt-cld/apikey_2)

**Warning** These private keys should be kept as environment variables in `.env`.

## `secure`

* Type: `Boolean`
* Default: `true`

Force secure HTTPS delivery urls for all assets (images + videos) generated by Cloudinary, even if they are embedded in HTTP originally.

Disable this flag to have all delivery urls built with HTTP protocol instead.

```js
/* gridsome.config.js */

export default {
plugins: [
{
use: 'gridsome-plugin-cloudinary',
options: {
secure: false
}
},
]
}
```

## `secureDistribution`

* Type: `String`
* Relevant only when `secure` is `true`

Set custom domain name for building **secure HTTPS** urls.

```js
/* gridsome.config.js */

export default {
plugins: [
{
use: 'gridsome-plugin-cloudinary',
options: {
secureDistribution: 'your-custome-domain-name'
}
},
]
}
```

Only relevant if you are Advanced plan Cloudinary user with private CDN distribution and custom CNAME set. You can see [more details here](https://cloudinary.com/documentation/advanced_url_delivery_options#private_cdns_and_cnames)

## `cname`

* Type: `String`
* Use **only** when `secure` is `false`

Set custom domain name for building **non-secure HTTP** urls.

```js
/* gridsome.config.js */

export default {
plugins: [
{
use: 'gridsome-plugin-cloudinary',
options: {
cname: 'your-custome-domain-name'
}
},
]
}
```

Only relevant if you are Advanced plan Cloudinary user with private CDN distribution and custom CNAME set. You can see [more details here](https://cloudinary.com/documentation/advanced_url_delivery_options#private_cdns_and_cnames)

## `privateCdn`

* Type: `Boolean`
* Default: `false`

Set to `true` if you'd like to use private CDN distribution.

```js
/* gridsome.config.js */

export default {
plugins: [
{
use: 'gridsome-plugin-cloudinary',
options: {
privateCdn: true
}
},
]
}
```

Only relevant for Advanced plan Cloudinary users. You can see [more details here](https://cloudinary.com/documentation/advanced_url_delivery_options#private_cdns_and_cnames)
Loading

0 comments on commit 6887be3

Please sign in to comment.