Skip to content

Commit

Permalink
feat(repo): merge main from ~/Code/jumski/feedwise
Browse files Browse the repository at this point in the history
  • Loading branch information
jumski committed Jan 21, 2025
2 parents de8006a + 5496513 commit 0badf5e
Show file tree
Hide file tree
Showing 34 changed files with 4,923 additions and 118 deletions.
21 changes: 21 additions & 0 deletions pkgs/pgflow.dev/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
13 changes: 13 additions & 0 deletions pkgs/pgflow.dev/.prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// .prettierrc.mjs
/** @type {import("prettier").Config} */
export default {
plugins: ["prettier-plugin-astro"],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
};
4 changes: 4 additions & 0 deletions pkgs/pgflow.dev/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions pkgs/pgflow.dev/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
55 changes: 55 additions & 0 deletions pkgs/pgflow.dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Starlight Starter Kit: Basics

[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)

```
npm create astro@latest -- --template starlight
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🚀 Project Structure

Inside of your Astro + Starlight project, you'll see the following folders and files:

```
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
```

Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.

Images can be added to `src/assets/` and embedded in Markdown with a relative link.

Static assets, like favicons, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
48 changes: 48 additions & 0 deletions pkgs/pgflow.dev/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// @ts-check
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";

// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: "pgflow",
social: {
github: "https://github.com/pgflow-dev/pgflow",
discord: "https://discord.gg/fyMHqy9h",
twitter: "https://x.com/pgflow_dev",
blueSky: "https://bsky.app/profile/pgflow.bsky.social",
},
components: {},
head: [
{
tag: "script",
content: `
import { inject } from '@vercel/analytics';
inject();
`,
},
],
sidebar: [
{
label: "Edge Worker",
items: [
{ label: "How it works?", slug: "edge-worker/how-it-works" },
{
label: "Prepare environment",
slug: "edge-worker/prepare-environment",
},
{
label: "Create your first worker",
slug: "edge-worker/create-first-worker",
},
{ label: "Configuration", slug: "edge-worker/configuration" },
],
},
],
expressiveCode: {
themes: ["tokyo-night"],
},
}),
],
});
10 changes: 10 additions & 0 deletions pkgs/pgflow.dev/bin/mmdc-watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

diagram_path=src/content/docs/reference/diagram.mermaid
diagram_dir=$(dirname $diagram_path)
diagram_file=$(basename $diagram_path)
diagram_base=$(basename $diagram_path .mermaid)
png_path=${diagram_dir}/${diagram_base}.png

echo $diagram_path |\
entr fish -c "mmdc --outputFormat png --output $png_path < $diagram_path ; kitten icat $png_path"
23 changes: 23 additions & 0 deletions pkgs/pgflow.dev/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "pgflow-dev",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/starlight": "^0.31.0",
"@vercel/analytics": "^1.4.1",
"astro": "^5.1.7",
"sharp": "^0.32.5",
"typescript": "^5.6.3"
},
"devDependencies": {
"prettier-plugin-astro": "^0.14.1"
}
}
19 changes: 19 additions & 0 deletions pkgs/pgflow.dev/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions pkgs/pgflow.dev/src/assets/edge-worker-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgs/pgflow.dev/src/assets/houston.webp
Binary file not shown.
19 changes: 19 additions & 0 deletions pkgs/pgflow.dev/src/assets/pgflow-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions pkgs/pgflow.dev/src/components/CodeAfterMarker.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
import { Code } from "@astrojs/starlight/components";
interface Props {
code: string;
}
const { code } = Astro.props;
const lines = code.split("\n");
const markerIndex = lines.findIndex((line) => line.includes("//////////"));
const relevantPart =
markerIndex !== -1 ? lines.slice(markerIndex + 1).join("\n") : code;
---

<Code {...Astro.props} code={relevantPart || code} />
12 changes: 12 additions & 0 deletions pkgs/pgflow.dev/src/components/Head.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
import DefaultHead from "@astrojs/starlight/components/Head.astro";
import Analytics from "@vercel/analytics/astro";
import type { Props } from "@astrojs/starlight/props";
type HeadProps = Props;
const props = Astro.props as HeadProps;
---

<DefaultHead {...props} />
<Analytics />
<!-- Inject Vercel Analytics into the head -->
6 changes: 6 additions & 0 deletions pkgs/pgflow.dev/src/components/SiteTitle.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
import type { Props } from "@astrojs/starlight/props";
import Default from "@astrojs/starlight/components/SiteTitle.astro";
---

<Default {...Astro.props} siteTitleHref="/sidebar" />
7 changes: 7 additions & 0 deletions pkgs/pgflow.dev/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineCollection } from "astro:content";
import { docsLoader } from "@astrojs/starlight/loaders";
import { docsSchema } from "@astrojs/starlight/schema";

export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
};
Loading

0 comments on commit 0badf5e

Please sign in to comment.