Skip to content

Commit

Permalink
Merge pull request #188 from Peppermint-Lab/next
Browse files Browse the repository at this point in the history
new docs and ant design hotfix
  • Loading branch information
potts99 committed Nov 28, 2023
2 parents a77fafd + a1a8eb2 commit 88c6679
Show file tree
Hide file tree
Showing 11 changed files with 2,946 additions and 1,082 deletions.
1 change: 0 additions & 1 deletion apps/client/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "antd/dist/antd.css";
import "../styles/globals.css";

import {
Expand Down
89 changes: 0 additions & 89 deletions apps/client/pages/tickets/new/[id]/index.js

This file was deleted.

18 changes: 0 additions & 18 deletions apps/client/pages/tickets/new/[id]/submitted.js

This file was deleted.

17 changes: 17 additions & 0 deletions apps/docs/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.jsx",
defaultShowCopyCode: true,
flexsearch: {
codeblocks: true,
},
codeHighlight: true,
});

module.exports = withNextra({
reactStrictMode: true,
swcMinify: true,
});

// If you have other Next.js configurations, you can pass them as the parameter:
// module.exports = withNextra({ /* other next.js config */ })
21 changes: 21 additions & 0 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "docs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"next": "^14.0.3",
"nextra": "^2.13.2",
"nextra-theme-docs": "^2.13.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
}
5 changes: 5 additions & 0 deletions apps/docs/pages/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"index": {
"title": "Welcome"
}
}
8 changes: 8 additions & 0 deletions apps/docs/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Welcome to Peppermint 🍵

We are an Open Source Ticket Management System hoping to improve the user experience for people in teams
or using similar software on their own. Our aim is to create software which is easy to use but still offers all the
feature rich components paid solutions have.

Using docker-compose we can quickly get a copy of the production build,
the following docker-compose below can be used to get the up to date production build of Peppermint.
43 changes: 43 additions & 0 deletions apps/docs/pages/install.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Install

```docker
version: "3.1"
services:
peppermint_postgres:
container_name: peppermint_postgres
image: postgres:latest
restart: always
ports:
- 5432:5432
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_USER: peppermint
POSTGRES_PASSWORD: 1234
POSTGRES_DB: peppermint
peppermint:
container_name: peppermint
image: pepperlabs/peppermint:latest
ports:
- 3000:3000
- 5003:5003
restart: always
depends_on:
- peppermint_postgres
healthcheck:
test: ["CMD", "sh", "-c", "wget --spider $$BASE_URL"]
interval: 30s
timeout: 10s
retries: 3
environment:
DB_USERNAME: "peppermint"
DB_PASSWORD: "1234"
DB_HOST: "peppermint_postgres"
SECRET: 'peppermint4life'
API_URL: "http://server-ip:5003"
volumes:
pgdata:
```
28 changes: 28 additions & 0 deletions apps/docs/seo.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const seoConfig = {
metadataBase: new URL("https://peppermint.sh"),
title: {
template: "Peppermint",
default:
"Peppermint - An open source zendesk alternative with a focus on simplicity and speed",
},
description:
"Peppermint is an open source zendesk alternative with a focus on simplicity and speed",
themeColor: "#F6E458",
openGraph: {
images: "/og-image.png",
url: "https://peppermint.sh",
},
manifest: "/site.webmanifest",
icons: [
{ rel: "icon", url: "/favicon.ico" },
{ rel: "apple-touch-icon", url: "/apple-touch-icon.png" },
{ rel: "mask-icon", url: "/favicon.ico" },
{ rel: "image/x-icon", url: "/favicon.ico" },
],
twitter: {
site: "@potts_dev",
creator: "@potts_dev",
},
};

export default seoConfig;
65 changes: 65 additions & 0 deletions apps/docs/theme.config.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import { useRouter } from 'next/router'
import seoConfig from './seo.config'

const config = {
logo: "Peppermint",
project: { link: 'https://github.com/Peppermint-Lab/peppermint' },
useNextSeoProps() {
const { route } = useRouter()
const { url, images } = seoConfig.openGraph

return {
titleTemplate: seoConfig.title.template,
openGraph: { url, images: [{ url: `${url}${images}` }] }
}
},
docsRepositoryBase: 'https://github.com/Peppermint-Lab/docs',
sidebar: {
toggleButton: true,

},
// i18n: [
// { locale: 'en', text: 'English' },
// ],
footer: '',
banner: {
key: '2.0-release',
text: (
<a href="https://nextra.site" target="_blank">
🎉 Peppermint 0.3 is released. Read more →
</a>
)
},
head: () => {
const title = seoConfig.title.template

return (
<>
{seoConfig.icons.map((icon, index) => (
<link key={index} rel={icon.rel} href={icon.url} />
))}
<meta httpEquiv="Content-Language" content="en" />
<meta
name="description"
content={seoConfig.description}
/>
<meta
name="og:title"
content={title ? title + ' – Panda' : seoConfig.title.default}
/>
<meta
name="og:description"
content={seoConfig.description}
/>
<meta name="og:image" content={seoConfig.openGraph.images} />
<meta name="og:url" content={seoConfig.openGraph.url} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content={seoConfig.twitter.site} />
<meta name="twitter:creator" content={seoConfig.twitter.creator} />
<meta name="apple-mobile-web-app-title" content="Panda" />
</>
)
}
}

export default config
Loading

0 comments on commit 88c6679

Please sign in to comment.