-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from railwayapp/basic-documentation-site
basic documentation site
- Loading branch information
Showing
40 changed files
with
1,836 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"], | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# global options | ||
{ | ||
admin off # theres no need for the admin api in railway's environment | ||
persist_config off # storage isn't persistent anyway | ||
auto_https off # railway handles https for us, this would cause issues if left enabled | ||
# runtime logs | ||
log { | ||
format json # set runtime log format to json mode | ||
} | ||
# server options | ||
servers { | ||
trusted_proxies static private_ranges # trust railway's proxy | ||
} | ||
} | ||
|
||
# site block, listens on the $PORT environment variable, automatically assigned by railway | ||
:{$PORT} { | ||
# access logs | ||
log { | ||
format json # set access log format to json mode | ||
} | ||
|
||
# health check for railway | ||
respond /health 200 | ||
|
||
# serve from the 'dist' folder (Vite builds into the 'dist' folder) | ||
root * dist | ||
|
||
# enable gzipping responses | ||
encode gzip | ||
|
||
# serve files from 'dist' | ||
file_server | ||
|
||
# if path doesn't exist, redirect it to 'index.html' for client side routing | ||
try_files {path}.html | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Starlight Starter Kit: Basics | ||
|
||
[](https://starlight.astro.build) | ||
|
||
``` | ||
npm create astro@latest -- --template starlight | ||
``` | ||
|
||
[](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics) | ||
[](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics) | ||
[](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics) | ||
[](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/ | ||
│ └── content.config.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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
// @ts-check | ||
import { defineConfig } from "astro/config"; | ||
import starlight from "@astrojs/starlight"; | ||
|
||
import tailwind from "@astrojs/tailwind"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [ | ||
starlight({ | ||
title: "Railpack Docs", | ||
social: { | ||
github: "https://github.com/railwayapp/railpack", | ||
}, | ||
customCss: [ | ||
// Path to your Tailwind base styles: | ||
"./src/tailwind.css", | ||
|
||
// Fontsource files for to regular and semi-bold font weights. | ||
"@fontsource/inter/400.css", | ||
"@fontsource/inter/600.css", | ||
], | ||
sidebar: [ | ||
{ | ||
label: "Getting Started", | ||
link: "/getting-started", | ||
}, | ||
{ | ||
label: "Installation", | ||
link: "/installation", | ||
}, | ||
{ | ||
label: "Guides", | ||
items: [ | ||
{ | ||
label: "Building with CLI and BuildKit", | ||
link: "/guides/building-with-cli", | ||
}, | ||
{ | ||
label: "Building with a Custom Frontend", | ||
link: "/guides/custom-frontend", | ||
}, | ||
{ | ||
label: "Developing Locally", | ||
link: "/guides/developing-locally", | ||
}, | ||
], | ||
}, | ||
{ | ||
label: "Configuration", | ||
items: [ | ||
{ label: "Configuration File", link: "/config/file" }, | ||
{ | ||
label: "Environment Variables", | ||
link: "/config/environment-variables", | ||
}, | ||
], | ||
}, | ||
{ | ||
label: "Languages", | ||
items: [ | ||
{ label: "Node.js", link: "/languages/node" }, | ||
{ label: "Python", link: "/languages/python" }, | ||
{ label: "Go", link: "/languages/golang" }, | ||
{ label: "PHP", link: "/languages/php" }, | ||
], | ||
}, | ||
{ | ||
label: "Reference", | ||
items: [ | ||
{ label: "CLI Commands", link: "/reference/cli" }, | ||
{ label: "Configuration File", link: "/reference/config" }, | ||
], | ||
}, | ||
{ | ||
label: "Architecture", | ||
items: [ | ||
{ label: "High Level Overview", link: "/architecture/overview" }, | ||
{ | ||
label: "Package Resolution", | ||
link: "/architecture/package-resolution", | ||
}, | ||
{ label: "Plan Generation", link: "/architecture/plan-generation" }, | ||
{ label: "Secrets and Environment", link: "/architecture/secrets" }, | ||
{ | ||
label: "Previous Versions", | ||
link: "/architecture/previous-versions", | ||
}, | ||
{ label: "BuildKit Generation", link: "/architecture/buildkit" }, | ||
{ label: "Caching", link: "/architecture/caching" }, | ||
], | ||
}, | ||
{ | ||
label: "Contributing", | ||
link: "/contributing", | ||
}, | ||
], | ||
}), | ||
tailwind({ | ||
// Disable the default base styles: | ||
applyBaseStyles: false, | ||
}), | ||
], | ||
}); |
Oops, something went wrong.