Skip to content

Commit 88c6679

Browse files
authored
Merge pull request #188 from Peppermint-Lab/next
new docs and ant design hotfix
2 parents a77fafd + a1a8eb2 commit 88c6679

File tree

11 files changed

+2946
-1082
lines changed

11 files changed

+2946
-1082
lines changed

apps/client/pages/_app.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import "antd/dist/antd.css";
21
import "../styles/globals.css";
32

43
import {

apps/client/pages/tickets/new/[id]/index.js

Lines changed: 0 additions & 89 deletions
This file was deleted.

apps/client/pages/tickets/new/[id]/submitted.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

apps/docs/next.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const withNextra = require("nextra")({
2+
theme: "nextra-theme-docs",
3+
themeConfig: "./theme.config.jsx",
4+
defaultShowCopyCode: true,
5+
flexsearch: {
6+
codeblocks: true,
7+
},
8+
codeHighlight: true,
9+
});
10+
11+
module.exports = withNextra({
12+
reactStrictMode: true,
13+
swcMinify: true,
14+
});
15+
16+
// If you have other Next.js configurations, you can pass them as the parameter:
17+
// module.exports = withNextra({ /* other next.js config */ })

apps/docs/package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "docs",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"dev": "next",
8+
"build": "next build",
9+
"start": "next start"
10+
},
11+
"keywords": [],
12+
"author": "",
13+
"license": "ISC",
14+
"dependencies": {
15+
"next": "^14.0.3",
16+
"nextra": "^2.13.2",
17+
"nextra-theme-docs": "^2.13.2",
18+
"react": "^18.2.0",
19+
"react-dom": "^18.2.0"
20+
}
21+
}

apps/docs/pages/_meta.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"index": {
3+
"title": "Welcome"
4+
}
5+
}

apps/docs/pages/index.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Welcome to Peppermint 🍵
2+
3+
We are an Open Source Ticket Management System hoping to improve the user experience for people in teams
4+
or using similar software on their own. Our aim is to create software which is easy to use but still offers all the
5+
feature rich components paid solutions have.
6+
7+
Using docker-compose we can quickly get a copy of the production build,
8+
the following docker-compose below can be used to get the up to date production build of Peppermint.

apps/docs/pages/install.mdx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Install
2+
3+
```docker
4+
version: "3.1"
5+
6+
services:
7+
peppermint_postgres:
8+
container_name: peppermint_postgres
9+
image: postgres:latest
10+
restart: always
11+
ports:
12+
- 5432:5432
13+
volumes:
14+
- pgdata:/var/lib/postgresql/data
15+
environment:
16+
POSTGRES_USER: peppermint
17+
POSTGRES_PASSWORD: 1234
18+
POSTGRES_DB: peppermint
19+
20+
peppermint:
21+
container_name: peppermint
22+
image: pepperlabs/peppermint:latest
23+
ports:
24+
- 3000:3000
25+
- 5003:5003
26+
restart: always
27+
depends_on:
28+
- peppermint_postgres
29+
healthcheck:
30+
test: ["CMD", "sh", "-c", "wget --spider $$BASE_URL"]
31+
interval: 30s
32+
timeout: 10s
33+
retries: 3
34+
environment:
35+
DB_USERNAME: "peppermint"
36+
DB_PASSWORD: "1234"
37+
DB_HOST: "peppermint_postgres"
38+
SECRET: 'peppermint4life'
39+
API_URL: "http://server-ip:5003"
40+
41+
volumes:
42+
pgdata:
43+
```

apps/docs/seo.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
const seoConfig = {
2+
metadataBase: new URL("https://peppermint.sh"),
3+
title: {
4+
template: "Peppermint",
5+
default:
6+
"Peppermint - An open source zendesk alternative with a focus on simplicity and speed",
7+
},
8+
description:
9+
"Peppermint is an open source zendesk alternative with a focus on simplicity and speed",
10+
themeColor: "#F6E458",
11+
openGraph: {
12+
images: "/og-image.png",
13+
url: "https://peppermint.sh",
14+
},
15+
manifest: "/site.webmanifest",
16+
icons: [
17+
{ rel: "icon", url: "/favicon.ico" },
18+
{ rel: "apple-touch-icon", url: "/apple-touch-icon.png" },
19+
{ rel: "mask-icon", url: "/favicon.ico" },
20+
{ rel: "image/x-icon", url: "/favicon.ico" },
21+
],
22+
twitter: {
23+
site: "@potts_dev",
24+
creator: "@potts_dev",
25+
},
26+
};
27+
28+
export default seoConfig;

apps/docs/theme.config.jsx

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import { useRouter } from 'next/router'
2+
import seoConfig from './seo.config'
3+
4+
const config = {
5+
logo: "Peppermint",
6+
project: { link: 'https://github.com/Peppermint-Lab/peppermint' },
7+
useNextSeoProps() {
8+
const { route } = useRouter()
9+
const { url, images } = seoConfig.openGraph
10+
11+
return {
12+
titleTemplate: seoConfig.title.template,
13+
openGraph: { url, images: [{ url: `${url}${images}` }] }
14+
}
15+
},
16+
docsRepositoryBase: 'https://github.com/Peppermint-Lab/docs',
17+
sidebar: {
18+
toggleButton: true,
19+
20+
},
21+
// i18n: [
22+
// { locale: 'en', text: 'English' },
23+
// ],
24+
footer: '',
25+
banner: {
26+
key: '2.0-release',
27+
text: (
28+
<a href="https://nextra.site" target="_blank">
29+
🎉 Peppermint 0.3 is released. Read more →
30+
</a>
31+
)
32+
},
33+
head: () => {
34+
const title = seoConfig.title.template
35+
36+
return (
37+
<>
38+
{seoConfig.icons.map((icon, index) => (
39+
<link key={index} rel={icon.rel} href={icon.url} />
40+
))}
41+
<meta httpEquiv="Content-Language" content="en" />
42+
<meta
43+
name="description"
44+
content={seoConfig.description}
45+
/>
46+
<meta
47+
name="og:title"
48+
content={title ? title + ' – Panda' : seoConfig.title.default}
49+
/>
50+
<meta
51+
name="og:description"
52+
content={seoConfig.description}
53+
/>
54+
<meta name="og:image" content={seoConfig.openGraph.images} />
55+
<meta name="og:url" content={seoConfig.openGraph.url} />
56+
<meta name="twitter:card" content="summary_large_image" />
57+
<meta name="twitter:site" content={seoConfig.twitter.site} />
58+
<meta name="twitter:creator" content={seoConfig.twitter.creator} />
59+
<meta name="apple-mobile-web-app-title" content="Panda" />
60+
</>
61+
)
62+
}
63+
}
64+
65+
export default config

0 commit comments

Comments
 (0)