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

KEY-234: Port showcase to Docs site #596

Merged
merged 71 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
0293bd8
WIP - starting the port over from Astro site
simonswiss Aug 25, 2023
8ec60e7
Sorting order fixed and width container removal
simonswiss Aug 25, 2023
4246373
WIP continued — overall layout shaping up (not responsive!)
simonswiss Aug 25, 2023
fb5a176
ActionButton WIP
simonswiss Aug 28, 2023
1878da1
Navigation
simonswiss Aug 28, 2023
0069de3
WIP drilldown page
simonswiss Aug 28, 2023
b8dfe47
Cross project navigation in showcase individual page
simonswiss Aug 28, 2023
f9abc99
layout fix
simonswiss Aug 28, 2023
8a23862
Fix nextProject link
simonswiss Aug 28, 2023
c91c304
Merge branch 'main' into showcase
simonswiss Aug 28, 2023
1881114
showcase-navigator layout with CSS grid
simonswiss Aug 30, 2023
7eb8298
showcase navigator CSS Grid implementation
simonswiss Aug 30, 2023
113ff56
showcase navigator tweaks
simonswiss Aug 30, 2023
091b91b
switch to cloud
simonswiss Aug 30, 2023
6bb809b
Update docs/src/content/projects/better-dev-screencasts
keystatic-cloud[bot] Aug 31, 2023
fc2fac6
Add path prefix to projects config
simonswiss Aug 31, 2023
9edbb84
Merge branch 'showcase' of github.com:Thinkmill/keystatic into showcase
simonswiss Aug 31, 2023
e0112dc
Update docs/src/content/projects/better-dev-screencasts
keystatic-cloud[bot] Aug 31, 2023
303c8de
remove unused `component` function from config
simonswiss Aug 31, 2023
45ac6b4
Merge branch 'showcase' of github.com:Thinkmill/keystatic into showcase
simonswiss Aug 31, 2023
0803511
re-use aside and cloud-image components and renderers
simonswiss Aug 31, 2023
eaf21e2
Update docs/src/content/projects/better-dev-screencasts
keystatic-cloud[bot] Aug 31, 2023
63b4a5e
Update docs/src/content/projects/better-dev-screencasts
keystatic-cloud[bot] Aug 31, 2023
a5a7b2b
Update docs/src/content/projects/ss
keystatic-cloud[bot] Aug 31, 2023
98721a1
Delete ss.mdoc
simonswiss Aug 31, 2023
f683730
use cloud images for cover images
simonswiss Aug 31, 2023
af32d88
Update docs/src/content/projects/blog-demo
keystatic-cloud[bot] Aug 31, 2023
75c3ea2
Update docs/src/content/projects/better-dev-screencasts
keystatic-cloud[bot] Aug 31, 2023
02c211a
Update docs/src/content/projects/thinkmill
keystatic-cloud[bot] Aug 31, 2023
a014251
Update docs/src/content/projects/keystatic-docs
keystatic-cloud[bot] Aug 31, 2023
35bd9d6
Update docs/src/content/projects/blog-demo
keystatic-cloud[bot] Aug 31, 2023
20b5796
Update docs/src/content/projects/in-the-chair
keystatic-cloud[bot] Aug 31, 2023
38f16d9
Update docs/src/content/projects/blog-demo
keystatic-cloud[bot] Aug 31, 2023
1683268
Update docs/src/content/projects/luke-bennett
keystatic-cloud[bot] Aug 31, 2023
0ffcaf2
Update docs/src/content/projects/luke-bennett
keystatic-cloud[bot] Aug 31, 2023
d5a1c09
Update docs/src/content/projects/marketing-landing-page
keystatic-cloud[bot] Aug 31, 2023
6f98d3a
Update docs/src/content/projects/react-sydney-meetup
keystatic-cloud[bot] Aug 31, 2023
1a4ea6c
Update docs/src/content/projects/star-athletics
keystatic-cloud[bot] Aug 31, 2023
3466967
Update docs/src/content/projects/sydjs-meetup
keystatic-cloud[bot] Aug 31, 2023
6023136
Update docs/src/content/projects/keystatic-docs
keystatic-cloud[bot] Aug 31, 2023
b490c5a
conditionally show repo link on showcase grid
simonswiss Aug 31, 2023
8799c1a
Merge branch 'main' into showcase
simonswiss Aug 31, 2023
a7641ff
prettier formatting
simonswiss Aug 31, 2023
0abcedb
Merge branch 'showcase' of github.com:Thinkmill/keystatic into showcase
simonswiss Aug 31, 2023
025de4c
more prettier
simonswiss Aug 31, 2023
41c1580
improved images + local/cloud combo
simonswiss Sep 4, 2023
fe03867
Responsive showcase navigation
simonswiss Sep 4, 2023
0ff6a6d
new Slate color palette flowing throughout — removing former "keystat…
simonswiss Sep 4, 2023
efd3d52
Color curation throughout the entire docs site, aggressively overwrit…
simonswiss Sep 4, 2023
b27615d
specify convention for colors
simonswiss Sep 4, 2023
6fa1d88
Merge branch 'main' into showcase
simonswiss Sep 4, 2023
97ebe41
remove rewrites since there is no longer a separate website on anothe…
simonswiss Sep 4, 2023
340641e
Merge branch 'showcase' of github.com:Thinkmill/keystatic into showcase
simonswiss Sep 4, 2023
08cd197
update better-dev cloud image link
simonswiss Sep 4, 2023
be8e5ca
OG image from Thinkmill Labs Keystatic Cloud account
simonswiss Sep 4, 2023
6a78424
Merge branch 'main' into showcase
simonswiss Sep 4, 2023
470fa9b
Merge branch 'main' into showcase
JedWatson Sep 4, 2023
aae38e6
Update docs/src/content/pages/entry-layout
keystatic-cloud[bot] Sep 4, 2023
092f3f6
Update docs/src/content/pages/github-mode
keystatic-cloud[bot] Sep 4, 2023
0ccf12c
phasing out keystatic.io domain images
simonswiss Sep 4, 2023
0e23e78
Merge branch 'showcase' of github.com:Thinkmill/keystatic into showcase
simonswiss Sep 4, 2023
40e60ad
remove unused forms (can always retrieve from GIT history)
simonswiss Sep 5, 2023
e7f00ce
lockfile
simonswiss Sep 5, 2023
45466a7
lockfile pretty please?
simonswiss Sep 5, 2023
ce29efc
delete lockfile
simonswiss Sep 5, 2023
4918222
Merge branch 'main' into showcase
JedWatson Sep 5, 2023
8769b78
Update pnpm-lock.yaml
JedWatson Sep 5, 2023
7bd021e
Merge branch 'main' into showcase
JedWatson Sep 5, 2023
563bc21
Updated open-graph bg image
simonswiss Sep 5, 2023
b93c33d
Merge branch 'showcase' of github.com:Thinkmill/keystatic into showcase
simonswiss Sep 5, 2023
9ff5137
Rollback keystatic.io images
simonswiss Sep 5, 2023
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: 0 additions & 2 deletions docs/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
NEXT_PUBLIC_AIRTABLE_TOKEN=
NEXT_PUBLIC_AIRTABLE_BASE_ID=

NEXT_PUBLIC_AIRTABLE_GET_ACCESS_TABLE_ID=
NEXT_PUBLIC_AIRTABLE_GET_NOTIFIED_TABLE_ID=
NEXT_PUBLIC_AIRTABLE_SEND_MESSAGE_TABLE_ID=
NEXT_PUBLIC_AIRTABLE_MAILING_LIST_TABLE_ID=

Expand Down
9 changes: 9 additions & 0 deletions docs/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const defaultPrettierConfig = require('../.prettierrc.js');

module.exports = {
...defaultPrettierConfig,
plugins: [
...(defaultPrettierConfig.plugins || []),
'prettier-plugin-tailwindcss',
],
};
4 changes: 4 additions & 0 deletions docs/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["cpylua.language-postcss", "bradlc.vscode-tailwindcss"],
"unwantedRecommendations": []
}
19 changes: 18 additions & 1 deletion docs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
{
"typescript.tsdk": "../node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.enablePromptUseWorkspaceTsdk": true,
// Tailwind Intellisense power-up
// Extend scope of supported attributes with `{anything}Classes`:
"tailwindCSS.classAttributes": [
"class",
"className",
"ngClass",
".*Classes.*"
],
// Regex black magic:
"tailwindCSS.experimental.classRegex": [
// tailwind-variants
["tv\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
// CVA (with support for JSON)
["cva(s*(\"[^\"]*\"|s*,s*|{(?:[^{}]|(?:{(?:[^{}]|(?:{[^{}]*}))*}))*}s*)*)"],
// `cx()` function from classnames / clsx
["cx\\(([^)]*)\\)", "(?:\"|'|`)([^(?:\"|'|`)]*)(?:\"|'|`)"]
]
}
50 changes: 49 additions & 1 deletion docs/keystatic.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default config({
kind: shouldUseCloudStorage ? 'cloud' : 'local',
},
cloud: {
project: 'thinkmill-labs/keystatic-site',
project: 'thinkmill-labs/keystatic-docs',
},
collections: {
// ------------------------------
Expand Down Expand Up @@ -199,6 +199,54 @@ export default config({
},
}),

// ------------------------------
// Projects
// ------------------------------
projects: collection({
label: 'Projects (Showcase)',
slugField: 'title',
path: `${pathPrefix}src/content/projects/*`,
format: { contentField: 'content' },
entryLayout: 'content',
schema: {
title: fields.slug({ name: { label: 'Title' } }),
type: fields.select({
label: 'Type',
options: [
{ label: 'Production', value: 'production' },
{ label: 'Demo', value: 'demo' },
],
defaultValue: 'demo',
}),
url: fields.url({ label: 'URL' }),
repoUrl: fields.url({
label: 'Repo URL',
description:
'Fill this only for pulic repos, where it makes sense to share.',
}),
summary: fields.text({
label: 'Summary',
multiline: true,
description: 'This will be used on the homepage listing.',
}),
coverImage: fields.cloudImage({
label: 'Cover image',
}),
sortIndex: fields.integer({ label: 'Sort Index', defaultValue: 100 }),
content: fields.document({
label: 'Content',
description:
'The long form copy for the project page. A link to a dedicated page will be available if this field is filled.',
formatting: true,
links: true,
componentBlocks: {
aside: componentBlocks['aside'],
'cloud-image': componentBlocks['cloud-image'],
},
}),
},
}),

// ------------------------------
// For testing purposes only
// ------------------------------
Expand Down
3 changes: 3 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
experimental: {
externalDir: true,
},
images: {
remotePatterns: [{ hostname: 'thinkmill-labs.keystatic.net' }],
},
async redirects() {
return [
{
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@keystatic/next": "^1.0.0",
"@markdoc/markdoc": "^0.3.0",
"@sindresorhus/slugify": "^1.1.2",
"@tailwindcss/container-queries": "^0.1.1",
"@tailwindcss/forms": "^0.5.3",
"@types/cookie": "^0.5.1",
"@types/node": "16.11.13",
Expand Down
4 changes: 2 additions & 2 deletions docs/src/app/(public)/blog/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default async function BlogPost({ params }: BlogProps) {
<p>
<Link
href="/blog"
className="underline hover:no-underline font-medium inline-flex gap-1 items-center"
className="inline-flex items-center gap-1 font-medium underline hover:no-underline"
>
<ArrowLeftIcon />
All blog posts
Expand All @@ -55,7 +55,7 @@ export default async function BlogPost({ params }: BlogProps) {
{page.title}
</h1>

<p className="text-sm text-neutral-500">
<p className="text-sm text-slate-9">
Published on {formattedDate} by{' '}
{page.authors.map((author, index) => (
<Fragment key={index}>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/(public)/blog/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default async function RootLayout({
}) {
return (
<>
<Main className="mx-auto w-full sm:max-w-xl flex flex-col flex-1 gap-4 px-6 pt-10 lg:pt-16 pb-16">
<Main className="mx-auto flex w-full flex-1 flex-col gap-4 px-6 pb-16 pt-10 sm:max-w-xl lg:pt-16">
{children}
</Main>
<Footer />
Expand Down
10 changes: 5 additions & 5 deletions docs/src/app/(public)/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export default async function Blog() {

return (
<>
<div className="sm:text-center mb-8">
<div className="mb-8 sm:text-center">
<h1
className="font-extrabold text-3xl sm:text-4xl md:text-5xl mb-8"
className="mb-8 text-3xl font-extrabold sm:text-4xl md:text-5xl"
id={H1_ID}
>
Blog
Expand All @@ -47,9 +47,9 @@ export default async function Blog() {
({ slug, formattedDate, entry }, index) => (
<li
key={index}
className="border-t border-keystatic-gray py-8 flex flex-col gap-2"
className="flex flex-col gap-2 border-t border-slate-4 py-8"
>
<p className="text-sm text-neutral-500">{formattedDate}</p>
<p className="text-sm text-slate-9">{formattedDate}</p>

<div className="flex flex-col gap-6">
<Link href={`blog/${slug}`}>
Expand All @@ -61,7 +61,7 @@ export default async function Blog() {
<p>
<Link
href={`blog/${slug}`}
className="underline hover:no-underline font-medium inline-flex gap-1 items-center"
className="inline-flex items-center gap-1 font-medium underline hover:no-underline"
tabIndex={-1}
aria-hidden
>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/app/(public)/docs/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export default async function Docs({ params }: DocsProps) {
const headings = [overviewHeading, ...headingsWithSlugs];

return (
<div className="grid gap-6 grid-cols-[auto] md:grid-cols-[auto,12rem]">
<div className="grid grid-cols-[auto] gap-6 md:grid-cols-[auto,12rem]">
<div>
<h1
id={H1_ID}
className="text-3xl font-extrabold mb-8 scroll-mt-[7rem]"
className="mb-8 scroll-mt-[7rem] text-3xl font-extrabold"
>
{page.title}
</h1>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/app/(public)/docs/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default async function RootLayout({
const navigationMap = await getNavigationMap();

return (
<div className="max-w-7xl min-h-screen mx-auto w-full">
<div className="mx-auto min-h-screen w-full max-w-7xl">
<SideNav>
{navigationMap?.map(({ groupName, items }) => (
<NavGroup key={groupName} title={groupName}>
Expand All @@ -39,7 +39,7 @@ export default async function RootLayout({
</SideNav>

{/** CONTENT */}
<div className="px-6 flex-1 lg:pl-60 lg:pt-24">
<div className="flex-1 px-6 lg:pl-60 lg:pt-24">
<div className="py-10 lg:pl-12">
<Main className="flex gap-8">
{/** INNER CONTENT */}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/(public)/docs/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function Docs() {
export default async function Docs() {
return null;
}
2 changes: 1 addition & 1 deletion docs/src/app/(public)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default async function RootLayout({
const navigationMap = await getNavigationMap();

return (
<div className="min-h-screen flex flex-col">
<div className="flex min-h-screen flex-col text-slate-12">
<HeaderNav navigationMap={navigationMap} />
{children}
</div>
Expand Down
Loading
Loading