Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incrementally update documentation #142

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Tohuhono ltd
Copyright (c) 2024 Tohuhono ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
95 changes: 82 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,116 @@ A monorepo for OberonCMS and the related packages and tooling.

## Quick start

This monorepo uses [pNpm](https://pnpm.io/) for workspace support - if you choose to use npm or yarn ymmv.
We use [pNpm](https://pnpm.io/) for workspace support - if you choose to use npm or yarn ymmv.

```
```sh
pnpm install

pnpm build
pnpm dev:oberon # Develop OberonCMS and all dependencies using the playground.

pnpm dev:demo # Develop the demo app and all dependencies.

pnpm dev:docs # Develop the documentation.

pnpm dev:rich-text-demo # Develop the rich text demo app and all dependencies.

pnpm tsc # Typecheck

pnpm dev:oberon
pnpm lint:fix # Run eslint, fixing any issues

pnpm lint
pnpm prettier:fix # Run prettier, fixing any issues

pnpm build # Build all packages

pnpm change # Add a changset entry
```

## What's inside?

This Turborepo includes the following packages/apps:
This [Turborepo](https://turbo.build/repo/) that includes the following packages and apps:

### Apps

- `apps/demo`

A demo app showcasing OberonCMS.

- `apps/documentation`

A Next.js app for the OberonCMS website.
https://tohuhono.com
Landing page and documentation for OberonCMS.
https://oberoncms.com

- `apps/playground`

A playground for developers to test OberonCMS. Mostly used for local development, there is also a [vercel deployment](https://playground.tohuhono.com) with access limited to core contributors.

- `apps/rich-text-demo`

an app demoing [puck-rich-text](https://www.npmjs.com/package/@tohuhono/puck-rich-text)

https://puck-rich-text.tohuhono.com

### Utilities and Config
### Packages

#### OberonCMS

- `packages/create-oberon-app`

A command line tool for creating new projects with OberonCMS.

- `packages/oberoncms/core`

The core package for OberonCMS.

#### Plugins

- `packages/plugins/pgsql`

A PostgreSQL database plugin for OberonCMS.

- `packages/plugins/turso`

A Turso libsql database plugin for OberonCMS.

- `packages/plugins/uploadthing`

An Puck component and OberonCMS plugin for embeding uploadthing images.

- `packages/plugins/vercel-postgres`

A Vercel PostgreSQL database plugin for OberonCMS.

#### Utilities and Config

- `packages/tohuhono/dev`

- `packages/dev`
- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting
- `packages/utils`
- `cn` - tailwind classname merge function

Base config and scripts for building packages and apps.

- `packages/tohuhono/utils`

A collection of utility functions shared across the monorepo. Particularly useful for testing.

- `packages/tohuhono/ui`

Shared UI components and utilities including a [tailwindcss](https://tailwindcss.com/) theme and components for dynamicly loading and adjusting it.

#### Puck components

- `packages/tohuhono/puck-rich-text`

A puck component for rich text editing made for OberonCMS.

- `packages/tohuhono/puck-blocks`

A collection of puck components for building pages in OberonCMS. _Not currently used or maintained_

## What next?

Under heavy development.
[Under heavy development.](https://github.com/orgs/Tohuhono/projects/1/views/1)

## Contributors

Expand Down
1 change: 0 additions & 1 deletion apps/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"devDependencies": {
"@tailwindcss/typography": "^0.5.10",
"@tohuhono/dev": "workspace:*",
"@tohuhono/utils": "workspace:*",
"@types/node": "^20",
"@types/react": "18.2.66",
"@types/react-dom": "18.2.22",
Expand Down
2 changes: 2 additions & 0 deletions apps/documentation/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-Agent: *
Disallow: /v/*
Binary file added apps/documentation/public/social.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions apps/documentation/src/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
--nav-height: 3rem;
--radius: 0.25rem;

--logo: 182.5 100% 22%;

/* light */
--background: 0 0% 100%;
--foreground: 210 100% 4%;
Expand Down
7 changes: 6 additions & 1 deletion apps/documentation/src/pages/_meta.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
export default {
index: {
title: "Home",
title: "OberonCMS",
type: "page",
display: "hidden",
},
developers: {
title: "Developers",
type: "page",
},
}
3 changes: 0 additions & 3 deletions apps/documentation/src/pages/about.mdx

This file was deleted.

4 changes: 4 additions & 0 deletions apps/documentation/src/pages/developers/_meta.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
"quick-start": "Quick Start",
roadmap: "Roadmap",
}
15 changes: 15 additions & 0 deletions apps/documentation/src/pages/developers/quick-start.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Quick Start Guide
### Create a new project
```sh npx2yarn copy
npx create-oberon-app my-app
```
Prompts will guide you through the process of selecting core plugins and setting some sane defaults.


### Manual installation

This is not docemented yet.

```sh npm2yarn copy
npm i @oberoncms/core
```
7 changes: 7 additions & 0 deletions apps/documentation/src/pages/developers/roadmap.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Roadmap

We are currently under heavy development.

Please post bug reports and feature requests on our [github issues board](https://github.com/tohuhono/oberon/issues).

You can also see an overview of planned features on our [project board](https://github.com/orgs/Tohuhono/projects/1/views/1).
2 changes: 2 additions & 0 deletions apps/documentation/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const config: Config = {
"./node_modules/@tohuhono/dev/dist/**/*.{js,ts,jsx,tsx,mdx}",
"./node_modules/@tohuhono/puck-blocks/dist/**/*.{js,ts,jsx,tsx,mdx}",
"./src/**/*.{js,ts,jsx,tsx,mdx}",
"./theme.config.jsx",
"./tailwind.classes.txt",
],
theme: {
Expand All @@ -26,6 +27,7 @@ const config: Config = {
},
},
colors: {
logo: "hsl(var(--logo))",
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
Expand Down
61 changes: 47 additions & 14 deletions apps/documentation/theme.config.jsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,71 @@
/* eslint-disable react-hooks/rules-of-hooks */
import { useConfig } from "nextra-theme-docs"
import Image from "next/image"
import { useRouter } from "next/router"

export default {
logo: <Image src="/icon.svg" width="30" height="30" alt="OberonCMS logo" />,
logo: (
<div className="flex flex-row items-center gap-2">
<Image src="/icon.svg" width="30" height="30" alt="OberonCMS logo" />
<div className="text-xl font-extrabold text-logo">OberonCMS</div>
</div>
),
project: {
link: "https://github.com/tohuhono/oberon",
},
docsRepositoryBase:
"https://github.com/tohuhono/oberon/tree/main/apps/documentation/",
"https://github.com/tohuhono/oberon/tree/main/apps/documentation",
useNextSeoProps() {
return {
titleTemplate: "%s – SWR",
titleTemplate: "%s - OberonCMS",
}
},
head: () => {
// eslint-disable-next-line react-hooks/rules-of-hooks
const { frontMatter } = useConfig()
const { asPath, defaultLocale, locale } = useRouter()
const { frontMatter, title } = useConfig()

const siteUrl = "https://tohuhono.com"
const url =
siteUrl + (defaultLocale === locale ? asPath : `/${locale}${asPath}`)

const defaultTitle = `OberonCMS - The NextJS Content Management System`
const description =
frontMatter.description ||
`A CMS for developers, designers and content creators. Get started quickly, build beautiful performant websites.`

return (
<>
<link rel="canonical" href={`${siteUrl}${asPath}`} />
<meta property="og:url" content={url} />
<meta property="description" content={description} />
<meta property="og:description" content={description} />
<meta property="og:type" content="website" />
<meta property="og:image" content={`${siteUrl}/social.png`} />
<meta property="og:image:height" content="675" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:alt" content="OberonCMS" />
<meta property="og:image:type" content="image/png" />
<meta property="og:locale" content="en" />
<meta property="og:site_name" content={defaultTitle} />
<meta name="image" content={`${siteUrl}/social.png`} />
<meta itemProp="image" content={`${siteUrl}/social.png`} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content={`${siteUrl}/social.png`} />
<meta name="twitter:description" content={description} />
<meta name="twitter:image:alt" content="OberonCMS" />
<meta name="twitter:image:height" content="675" />
<meta name="twitter:image:type" content="image/png" />
<meta name="twitter:image:width" content="1200" />
<meta
property="og:title"
content={frontMatter.title || "OberonCMS Documentation"}
/>
<meta
property="og:description"
name="twitter:title"
content={
frontMatter.description ||
"A CMS for developers, designers and content creators."
title !== defaultTitle ? `${title} - OberonCMS` : defaultTitle
}
/>

<link rel="icon" href="/favicon.ico" sizes="48x48" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
</>
)
},

// ... other theme options
}
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.