Skip to content

Commit 79a6a61

Browse files
authored
Merge pull request #92 from ODAncona/main
Code2prompt should deserve a REAL website
2 parents 2208251 + 65cacf3 commit 79a6a61

File tree

99 files changed

+22897
-30
lines changed

Some content is hidden

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

99 files changed

+22897
-30
lines changed

.github/workflows/documentation.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/website.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Code2prompt Website
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [ main ]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
11+
# Allow this job to clone the repo and create a page deployment
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout your repository using git
22+
uses: actions/checkout@v4
23+
- name: Install, build, and upload your site
24+
uses: withastro/action@v3
25+
with:
26+
path: website # The root location of your Astro project inside the repository. (optional)
27+
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
28+
package-manager: yarn # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
29+
30+
deploy:
31+
needs: build
32+
runs-on: ubuntu-latest
33+
environment:
34+
name: github-pages
35+
url: ${{ steps.deployment.outputs.page_url }}
36+
steps:
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4

website/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store

website/.vscode/extensions.json

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+
}

website/.vscode/launch.json

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+
}

website/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Starlight Starter Kit: Basics
2+
3+
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
4+
5+
```
6+
yarn create astro@latest -- --template starlight
7+
```
8+
9+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
10+
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
11+
[![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)
12+
[![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)
13+
14+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
15+
16+
## 🚀 Project Structure
17+
18+
Inside of your Astro + Starlight project, you'll see the following folders and files:
19+
20+
```
21+
.
22+
├── public/
23+
├── src/
24+
│ ├── assets/
25+
│ ├── content/
26+
│ │ ├── docs/
27+
│ └── content.config.ts
28+
├── astro.config.mjs
29+
├── package.json
30+
└── tsconfig.json
31+
```
32+
33+
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.
34+
35+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
36+
37+
Static assets, like favicons, can be placed in the `public/` directory.
38+
39+
## 🧞 Commands
40+
41+
All commands are run from the root of the project, from a terminal:
42+
43+
| Command | Action |
44+
| :------------------------ | :----------------------------------------------- |
45+
| `yarn install` | Installs dependencies |
46+
| `yarn dev` | Starts local dev server at `localhost:4321` |
47+
| `yarn build` | Build your production site to `./dist/` |
48+
| `yarn preview` | Preview your build locally, before deploying |
49+
| `yarn astro ...` | Run CLI commands like `astro add`, `astro check` |
50+
| `yarn astro -- --help` | Get help using the Astro CLI |
51+
52+
## 👀 Want to learn more?
53+
54+
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).

website/astro.config.mjs

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import starlight from '@astrojs/starlight';
4+
5+
// https://astro.build/config
6+
export default defineConfig({
7+
site: 'https://code2prompt.dev',
8+
integrations: [
9+
starlight({
10+
title: 'Code2prompt',
11+
logo: {
12+
light:'./src/assets/logo_dark_v0.0.1.svg',
13+
dark:'./src/assets/logo_light_v0.0.1.svg',
14+
},
15+
defaultLocale: 'root',
16+
locales: {
17+
// English docs in `src/content/en/`
18+
root: {
19+
label: 'English',
20+
lang: 'en',
21+
},
22+
},
23+
social: {
24+
github: 'https://github.com/mufeedvh/code2prompt',
25+
discord: 'https://discord.gg/ZZyBbsHTwH',
26+
},
27+
sidebar: [
28+
{
29+
label: "🚀 CLI Documentation",
30+
items: [
31+
{ label: "Welcome", link: "docs/cli/welcome" },
32+
{
33+
label: "Tutorials",
34+
items: [
35+
{ label: "Getting Started", link: "docs/cli/tutorials/getting_started" },
36+
{ label: "Using Templates", link: "docs/cli/tutorials/using_templates" },
37+
{ label: "Using Glob Pattern Tool", link: "docs/cli/tutorials/using_glob_pattern_tool" },
38+
{ label: "Use Filter", link: "docs/cli/tutorials/use_filter" },
39+
{ label: "Handlebars Templates", link: "docs/cli/tutorials/templates" },
40+
],
41+
},
42+
{
43+
label: "Explanations",
44+
items: [
45+
{ label: "What are Glob Patterns?", link: "docs/cli/explanations/glob_patterns" },
46+
{ label: "How the Glob Pattern Filter Works", link: "docs/cli/explanations/glob_pattern_filter" },
47+
{ label: "Understanding Tokenizers", link: "docs/cli/explanations/tokenizers" },
48+
{ label: "Glob Pattern Tool", link: "docs/cli/explanations/glob_pattern_tool" },
49+
],
50+
},
51+
{
52+
label: "How-To Guides",
53+
items: [
54+
{ label: "Install Code2Prompt", link: "docs/cli/how_to/install" },
55+
{ label: "Filter Files", link: "docs/cli/how_to/filter_files" },
56+
{ label: "Save Generated Prompt", link: "docs/cli/how_to/save_generated_prompt" },
57+
{ label: "Exclude Files from Tree", link: "docs/cli/how_to/exclude_files_from_tree" },
58+
],
59+
},
60+
],
61+
},
62+
{
63+
label: "📦 SDK Documentation",
64+
items: [
65+
{ label: "Welcome", link: "docs/sdk/welcome" },
66+
{
67+
label: "Tutorials",
68+
items: [
69+
{ label: "SDK Tutorial 1", link: "docs/sdk/tutorials/tutorial1" },
70+
{ label: "SDK Tutorial 2", link: "docs/sdk/tutorials/tutorial2" },
71+
],
72+
},
73+
{
74+
label: "Explanations",
75+
items: [
76+
{ label: "SDK Concepts", link: "docs/sdk/explanations/sdk_concepts" },
77+
],
78+
},
79+
{
80+
label: "How-To Guides",
81+
items: [
82+
{ label: "Install SDK", link: "docs/sdk/how_to/install" },
83+
{ label: "Use SDK", link: "docs/sdk/how_to/use_sdk" },
84+
],
85+
},
86+
],
87+
},
88+
]
89+
}),
90+
],
91+
});

website/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "code2prompt",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"start": "astro dev",
8+
"build": "astro build",
9+
"preview": "astro preview",
10+
"astro": "astro"
11+
},
12+
"dependencies": {
13+
"@astrojs/starlight": "^0.32.1",
14+
"astro": "^5.1.5",
15+
"sharp": "^0.32.5"
16+
}
17+
}

website/public/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
code2prompt.dev

website/public/assets/css/fontawesome-all.min.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)