Skip to content

Commit

Permalink
Publish docs into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
raidensakura committed May 22, 2023
1 parent e5c9149 commit 54a450d
Show file tree
Hide file tree
Showing 17 changed files with 2,450 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.next
node_modules
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) 2022 Shu Ding

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.
23 changes: 23 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Nextra Docs Template

This is a template for creating documentation with [Nextra](https://nextra.site).

[**Live Demo →**](https://nextra-docs-template.vercel.app)

[![](.github/screenshot.png)](https://nextra-docs-template.vercel.app)

## Quick Start

Click the button to clone this repository and deploy it on Vercel:

[![](https://vercel.com/button)](https://vercel.com/new/clone?s=https%3A%2F%2Fgithub.com%2Fshuding%2Fnextra-docs-template&showOptionalTeamCreation=false)

## Local Development

First, run `pnpm i` to install the dependencies.

Then, run `pnpm dev` to start the development server and visit localhost:3000.

## License

This project is licensed under the MIT License.
6 changes: 6 additions & 0 deletions docs/components/counters.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.counter {
border: 1px solid #ccc;
border-radius: 5px;
padding: 2px 6px;
margin: 12px 0 0;
}
24 changes: 24 additions & 0 deletions docs/components/counters.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Example from https://beta.reactjs.org/learn

import { useState } from 'react'
import styles from './counters.module.css'

function MyButton() {
const [count, setCount] = useState(0)

function handleClick() {
setCount(count + 1)
}

return (
<div>
<button onClick={handleClick} className={styles.counter}>
Clicked {count} times
</button>
</div>
)
}

export default function MyApp() {
return <MyButton />
}
5 changes: 5 additions & 0 deletions docs/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
6 changes: 6 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
})

module.exports = withNextra()
31 changes: 31 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "nextra-docs-template",
"version": "0.0.1",
"description": "Nextra docs template",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"repository": {
"type": "git",
"url": "git+https://github.com/shuding/nextra-docs-template.git"
},
"author": "Shu Ding <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/shuding/nextra-docs-template/issues"
},
"homepage": "https://github.com/shuding/nextra-docs-template#readme",
"dependencies": {
"next": "^13.0.6",
"nextra": "latest",
"nextra-theme-docs": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "18.11.10",
"typescript": "^4.9.3"
}
}
15 changes: 15 additions & 0 deletions docs/pages/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"index": "Introduction",
"another": "Another Page",
"advanced": "Advanced (A Folder)",
"about": {
"title": "About",
"type": "page"
},
"contact": {
"title": "Contact ↗",
"type": "page",
"href": "https://twitter.com/shuding_",
"newWindow": true
}
}
3 changes: 3 additions & 0 deletions docs/pages/about.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# About

This is the about page! This page is shown on the navbar.
3 changes: 3 additions & 0 deletions docs/pages/advanced.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Advanced

This is the index page for the Advanced folder!
3 changes: 3 additions & 0 deletions docs/pages/advanced/satori.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Satori

Satori (悟り) is a Japanese Buddhist term for awakening, "comprehension; understanding".
31 changes: 31 additions & 0 deletions docs/pages/another.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Another Page

```js filename="demo.js" {3} copy
let a = 1;

console.log(a);
```

## Component

import { useState } from 'react'

{/* Import CSS modules */}
import styles from '../components/counters.module.css'

export const Counter = () => {
const [count, setCount] = useState(0);
return (
<div>
<button onClick={() => setCount(count + 1)} className={styles.counter}>Clicked {count} times</button>
</div>
);
};

<Counter/>

## External Component

import Counters from '../components/counters'

<Counters />
62 changes: 62 additions & 0 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Introduction

Modmail is a self-hosted Discord bot for your server. It works similar to [Reddit](https://reddit.zendesk.com/hc/en-us/articles/210896606-What-is-Modmail-)'s Modmail—both in functionality and purpose. It serves as a shared inbox for server staff to communicate with their users in a seamless way.

This bot is free for everyone and always will be. If you like this project and would like to show your appreciation, you can support us on [**Patreon**](https://www.patreon.com/kyber), cool benefits included!

## What is Modmail used for?

When a member sends a direct message to Modmail, the bot will create a channel (we call it a "thread") into a designated category. All further DM messages will automatically relay to that channel, then any available staff can respond within the channel. Compared to ticketing bots, Modmail allows easier and more organised discussions among staff.

![](https://i.imgur.com/fru5Q07.png)

Our Logviewer will save the threads so your staff can view previous threads through their corresponding log link. Here is an [example](https://publicmodmail.logs.vodka/logs/example).

## Features

#### **Highly customisable**

* Changeable bot status, prefix, category, log channel, etc.
* Versatile command permission system.
* Interface elements (color, responses, reactions, etc.).
* Snippets and command aliases.
* Minimum duration for accounts to be created before allowed to contact Modmail (`account_age`).
* Minimum length for members to be in the guild before allowed to contact Modmail (`guild_age`).

**Advanced logging functionality**

* When you close a thread, Modmail will generate a log link and post it to your log channel.
* Native Discord dark-mode feel.
* Markdown/formatting support.
* Discord authentication-protected logs ([Patreon-only feature](https://patreon.com/kyber)).
* See past logs of a user with `?logs`.
* Searchable by text queries using `?logs search`.

#### **Robust implementation**

* Ease of installation: you can get your Modmail bot running in under 10 minutes!
* Schedule tasks in human time, e.g. `?close in 2 hours silently`.
* Editing and deleting messages are synced.
* Support for the diverse range of message contents (multiple images, files).
* Paginated commands interfaces via reactions.

This list is ever-growing thanks to active development by our exceptional contributors. See a full list of available commands by using the `?help` command.

## Installation

Visit our [installation page](/installation) for detailed instructions on setting up Modmail for your server.

## Supporting the project

You have various options to help the project. Giving this repository a star is greatly appreciated. You can also help people that have trouble setting up Modmail at our [Discord server](https://discord.gg/cnUpwrnpYb).&#x20;

If you like to show your appreciation, consider supporting us on [**Patreon**](https://www.patreon.com/kyber)!

### Contributing

Support Modmail with your contributions! Whether it be improvements to the documentation or new functionality, please feel free to make the change. Check out our [contributing guidelines](https://github.com/modmail-dev/modmail/blob/master/.github/CONTRIBUTING.md) before you get started.

## Next steps

* Read about [installing Modmail](installation/).
* Become familiar with [Modmail commands and functionalities](getting-started.md).
Loading

0 comments on commit 54a450d

Please sign in to comment.