Skip to content

Commit

Permalink
initialize docs structure
Browse files Browse the repository at this point in the history
  • Loading branch information
derrickmehaffy committed Sep 21, 2024
1 parent 5e816b1 commit 9348403
Show file tree
Hide file tree
Showing 33 changed files with 9,924 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
6 changes: 6 additions & 0 deletions docs/docs/api/client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Client'
slug: '/api/client'
---

# API Client
6 changes: 6 additions & 0 deletions docs/docs/api/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Config'
slug: '/api/config'
---

# API Config
6 changes: 6 additions & 0 deletions docs/docs/api/connections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Connections'
slug: '/api/connections'
---

# API Connections
6 changes: 6 additions & 0 deletions docs/docs/api/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Introduction'
slug: '/api/intro'
---

# API Introduction
6 changes: 6 additions & 0 deletions docs/docs/best-practices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Best Practices'
slug: '/best-practices'
---

# Best Practices
6 changes: 6 additions & 0 deletions docs/docs/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'FAQ'
slug: '/faq'
---

# Frequently Asked Questions
6 changes: 6 additions & 0 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Installation'
slug: '/installation'
---

# Installation
6 changes: 6 additions & 0 deletions docs/docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Introduction'
slug: '/'
---

# Intro
6 changes: 6 additions & 0 deletions docs/docs/plugins/rest-cache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'REST Cache'
slug: '/plugins/rest-cache'
---

# REST Cache Plugin
6 changes: 6 additions & 0 deletions docs/docs/redis/basic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Basic'
slug: '/redis/basic'
---

# Basic Single Node Config
6 changes: 6 additions & 0 deletions docs/docs/redis/cluster.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Cluster'
slug: '/redis/cluster'
---

# Cluster Config
6 changes: 6 additions & 0 deletions docs/docs/redis/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Introduction'
slug: '/redis/intro'
---

# Configuration Introduction
6 changes: 6 additions & 0 deletions docs/docs/redis/redlock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Redlock'
slug: '/redis/redlock'
---

# Redlock Config
6 changes: 6 additions & 0 deletions docs/docs/redis/sentinel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'Sentinel'
slug: '/redis/sentinel'
---

# Redis Sentinel Config
6 changes: 6 additions & 0 deletions docs/docs/redis/tls-auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_label: 'TLS Authentication'
slug: '/redis/tls-auth'
---

# TLS Authentication
83 changes: 83 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// @ts-check

import { themes as prismThemes } from 'prism-react-renderer';

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Strapi Plugin Redis',
tagline: 'Connecting Strapi to Redis with ease',
favicon: 'img/favicon.ico',
url: 'https://your-docusaurus-site.example.com',
baseUrl: '/',
organizationName: 'strapi-community', // Usually your GitHub org/user name.
projectName: 'plugin-redis', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
trailingSlash: false,

themes: ['@docusaurus/theme-mermaid'],

i18n: {
defaultLocale: 'en',
locales: ['en'],
},

markdown: {
mermaid: true,
},

plugins: [
[
'@cmfcmf/docusaurus-search-local',
{
indexBlog: false,
},
],
],

presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
{
docs: {
routeBasePath: '/',
sidebarPath: './sidebars.js',
editUrl: 'https://github.com/strapi-community/plugin-redis/docs/',
},
blog: false,
},
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'Strapi Plugin Redis',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
href: 'https://github.com/strapi-community/plugin-redis',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} Strapi Community Organization`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};

export default config;
49 changes: 49 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "docs",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "^1.2.0",
"@docusaurus/core": "3.5.2",
"@docusaurus/preset-classic": "3.5.2",
"@docusaurus/theme-mermaid": "^3.5.2",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.5.2",
"@docusaurus/types": "3.5.2"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"resolutions": {
"cheerio": "1.0.0-rc.12"
},
"engines": {
"node": ">=18.0"
}
}
48 changes: 48 additions & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// @ts-check

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
default: [
{
type: 'doc',
id: 'introduction',
},
{
type: 'doc',
id: 'installation',
},
{
type: 'doc',
id: 'best-practices',
},
{
type: 'doc',
id: 'faq',
},
{
type: 'category',
label: 'Configuration',
items: [
'redis/intro',
'redis/redlock',
'redis/basic',
'redis/sentinel',
'redis/cluster',
'redis/tls-auth',
],
collapsed: false,
},
{
type: 'category',
label: 'Plugins',
items: ['plugins/rest-cache'],
},
{
type: 'category',
label: 'API',
items: ['api/intro', 'api/client', 'api/config', 'api/connections'],
},
],
};

export default sidebars;
Loading

0 comments on commit 9348403

Please sign in to comment.