Skip to content

Commit e7316b6

Browse files
committed
Merge branch 'main' into openai-chat
2 parents 2a1bff3 + c95ff18 commit e7316b6

File tree

255 files changed

+87658
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+87658
-13
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,22 @@ A collection of examples and demos for people building the web with Netlify
66

77
- Serverless functions, hello world — [Site](https://example-functions-hello-world.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/serverless/functions-hello-world)
88
- Edge Functions Examples — [Site](https://edge-functions-examples.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/edge-functions)
9+
- Client side auth with Clerk - [Code](https://github.com/netlify/examples/tree/main/examples/auth/clerk-js)
10+
- Gated content with Clerk - [Code](https://github.com/netlify/examples/tree/main/examples/auth/clerk-gated-page)
11+
- Astro platform starter - [Site](https://compose-astro-demo.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/compose-astro-platform-demo)
912
- Astro Server Islands - [Site](https://example-astro-server-islands.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/frameworks/astro-server-islands)
1013
- Astro with Sanity - [Site](https://example-astro-sanity.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/frameworks/astro-with-sanity)
1114
- Astro with Qwik - [Site](https://example-astro-qwik.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/frameworks/astro-with-qwik)
15+
- Astro with Netlify Visual Editor - [Site](https://example-astro-visual-editor.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/frameworks/astro-with-visual-editor)
1216
- AI Executive Summaries - [Site](https://example-ai-executive-summaries.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/ai-executive-summaries)
13-
17+
- AI Speech to Content with Groq - [Code](https://github.com/netlify/examples/tree/main/examples/ai-speech-to-content)
18+
- Block AI bots - [Site](https://example-disallow-ai-bots.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/ai-bot-control)
19+
- Supabase with Astro - [Site](https://supabase-astro-example.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/supabase-astro)
20+
- Turso with Astro - [Site](https://turso-astro.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/turso-astro)
21+
- Geosimcities: GeoCities with Advanced AI and Langbase - [Site](https://geosimcities.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/geosimcities)
22+
- User-generated uploads - [Site](https://example-user-uploads-astro-blobs.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/user-image-uploads-astro-blobs)
23+
- Hydrogen storefront with advanced caching - [Site](https://example-hydrogen-caching.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/frameworks/hydrogen-caching)
24+
- Nuxt 4 with advanced caching - [Site](https://example-nuxt-4-caching.netlify.app/), [Code](https://github.com/netlify/examples/tree/main/examples/frameworks/nuxt-4-caching)
1425

1526
## Repo organization
1627

examples/ai-speech-to-content/astro.config.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import netlify from "@astrojs/netlify";
44
export default defineConfig({
55
output: "hybrid",
66
adapter: netlify(),
7-
redirects : {
8-
"/": "/index"
7+
redirects: {
8+
"/": "/index",
9+
},
10+
vite: {
11+
server: {
12+
hmr: { path: "/vite-hmr/" },
13+
},
914
},
1015
});

examples/ai-speech-to-content/src/layouts/base.astro

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,5 @@
7373
<div>© 2024 Netlify</div>
7474
</small>
7575
</footer>
76-
<script is:inline>
77-
window.addEventListener('stackbitObjectsChanged', (event) => {
78-
event.preventDefault();
79-
80-
// prevent refresh when unrelated objects are updated
81-
if (event.detail.changedObjectIds.some((o) => event.detail.visibleObjectIds.includes(o))) {
82-
window.location.reload();
83-
}
84-
});
85-
</script>
8676
</body>
8777
</html>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# build output
2+
dist/
3+
4+
# generated types
5+
.astro/
6+
7+
# dependencies
8+
node_modules/
9+
10+
# logs
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# Local Netlify folder
24+
.netlify
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"tabWidth": 2
6+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.codeActionsOnSave": {
4+
"source.fixAll.eslint": "explicit",
5+
"source.organizeImports": "explicit",
6+
"source.addMissingImports": "explicit"
7+
},
8+
"typescript.tsdk": "node_modules/typescript/lib",
9+
"files.associations": {
10+
"*.css": "tailwindcss"
11+
},
12+
"deno.enable": true,
13+
"deno.enablePaths": ["netlify/edge-functions"],
14+
"deno.unstable": true,
15+
"deno.importMap": ".netlify/edge-functions-import-map.json"
16+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Astro on Netlify Platform Starter
2+
3+
[Live Demo](https://astro-platform-starter.netlify.app/)
4+
5+
A modern starter based on Astro.js, Tailwind, daisyUI, and [Netlify Core Primitives](https://docs.netlify.com/core/overview/#develop) (Edge Functions, Image CDN, Blob Store).
6+
7+
## Astro Commands
8+
9+
All commands are run from the root of the project, from a terminal:
10+
11+
| Command | Action |
12+
| :------------------------ | :----------------------------------------------- |
13+
| `npm install` | Installs dependencies |
14+
| `npm run dev` | Starts local dev server at `localhost:4321` |
15+
| `npm run build` | Build your production site to `./dist/` |
16+
| `npm run preview` | Preview your build locally, before deploying |
17+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
18+
| `npm run astro -- --help` | Get help using the Astro CLI |
19+
20+
## Deploying to Netlify
21+
22+
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/astro-platform-starter)
23+
24+
## Developing Locally
25+
26+
| Prerequisites |
27+
| :--------------------------------------------------------------------------- |
28+
| [Node.js](https://nodejs.org/) v18.14+. |
29+
| (optional) [nvm](https://github.com/nvm-sh/nvm) for Node version management. |
30+
31+
1. Clone this repository, then run `npm install` in its root directory.
32+
33+
2. For the starter to have full functionality locally (e.g. edge functions, blob store), please ensure you have an up-to-date version of Netlify CLI. Run:
34+
35+
```
36+
npm install netlify-cli@latest -g
37+
```
38+
39+
3. Link your local repository to the deployed Netlify site. This will ensure you're using the same runtime version for both local development and your deployed site.
40+
41+
```
42+
netlify link
43+
```
44+
45+
4. Then, run the Astro.js development server via Netlify CLI:
46+
47+
```
48+
netlify dev
49+
```
50+
51+
If your browser doesn't navigate to the site automatically, visit [localhost:8888](http://localhost:8888).

0 commit comments

Comments
 (0)