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

[v3] Add starlight website #3917

Open
wants to merge 47 commits into
base: v3-alpha
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e6c5d6c
init docs
stavros-k Nov 26, 2024
5cb44e9
add few categories
stavros-k Nov 26, 2024
0eccc0c
add more
stavros-k Nov 26, 2024
ffbb69e
update home
stavros-k Nov 26, 2024
f7dd3e6
add blog
stavros-k Nov 26, 2024
94bc07f
update favicon
stavros-k Nov 26, 2024
0ea7467
fix few links and
stavros-k Nov 26, 2024
f468d83
untouch
stavros-k Nov 26, 2024
d84c74b
untouch more
stavros-k Nov 26, 2024
b8ab954
add some icons
stavros-k Nov 27, 2024
7bbff11
add icons
stavros-k Nov 27, 2024
7e4841e
move ggetting started at the top and collapse the rest
stavros-k Nov 27, 2024
906a3b9
actually collapse
stavros-k Nov 27, 2024
13b68b1
format
stavros-k Nov 27, 2024
d8f0f79
remove includes
stavros-k Nov 27, 2024
a39b7c9
more format
stavros-k Nov 27, 2024
6bd27f2
remove includes
stavros-k Nov 27, 2024
f1b9db1
move assets
stavros-k Nov 27, 2024
efddc48
add i18n
stavros-k Nov 27, 2024
f0267b6
fix i18n
stavros-k Nov 27, 2024
4470e85
formatting
stavros-k Nov 27, 2024
41a555a
order
stavros-k Nov 27, 2024
513faa2
Prevent sidebar from making the page shake during load
leaanthony Nov 30, 2024
e2daae6
Prevent sidebar from making the page shake during load
leaanthony Nov 30, 2024
40c72a8
organize docs
stavros-k Nov 30, 2024
b571101
fix link
stavros-k Nov 30, 2024
9834339
expand a bit
stavros-k Nov 30, 2024
8b94e5a
add credits page
stavros-k Dec 1, 2024
f0a6368
update all contributors file
stavros-k Dec 1, 2024
5bd4836
remove underlines
stavros-k Dec 1, 2024
f6d9500
add alternative
stavros-k Dec 1, 2024
5c41f23
use html
stavros-k Dec 1, 2024
51bd0e0
lets get the first success build
stavros-k Dec 1, 2024
a3deae2
add latest entry
stavros-k Dec 2, 2024
7bd53c2
remove example file
stavros-k Dec 2, 2024
d72e689
fix examples
stavros-k Dec 2, 2024
dd9f4c7
more fixes
stavros-k Dec 2, 2024
b53b4e6
fix grammar
stavros-k Dec 2, 2024
6844761
grammar
stavros-k Dec 2, 2024
5bc2a1b
remove dupes
stavros-k Dec 2, 2024
fe09578
fix link
stavros-k Dec 2, 2024
b0ec474
grammar
stavros-k Dec 3, 2024
4f709e0
typo
stavros-k Dec 3, 2024
43400db
typo
stavros-k Dec 3, 2024
c8210cb
typo
stavros-k Dec 3, 2024
55da481
Merge branch 'v3-alpha' into starlight-docs
leaanthony Dec 3, 2024
c02e1b5
Merge branch 'v3-alpha' into starlight-docs
stavros-k Dec 3, 2024
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
3 changes: 2 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"files": [
"website/src/pages/credits.mdx"
"website/src/pages/credits.mdx",
"docs/src/assets/contributors.html"
],
"imageSize": 75,
"commit": false,
Expand Down
1 change: 1 addition & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
overrides:
- files:
- "**/*.md"
- "**/*.mdx"
options:
printWidth: 80
proseWrap: always
21 changes: 21 additions & 0 deletions docs/.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
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": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions docs/.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"
}
]
}
60 changes: 60 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Starlight Starter Kit: Basics

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

```sh
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:

```sh
.
├── 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).
123 changes: 123 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// @ts-check
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import sitemap from "@astrojs/sitemap";
import starlightLinksValidator from "starlight-links-validator";
import starlightImageZoom from "starlight-image-zoom";
import starlightBlog from "starlight-blog";
import { authors } from "./src/content/authors";

// https://astro.build/config
export default defineConfig({
// TODO: update this
site: "https://wails.io",
trailingSlash: "ignore",
compressHTML: true,
output: "static",
build: { format: "directory" },
devToolbar: { enabled: true },
integrations: [
sitemap(),
starlight({
title: "Wails (Alpha)",
logo: {
dark: "./src/assets/wails-logo-horizontal-dark.svg",
light: "./src/assets/wails-logo-horizontal-light.svg",
},
favicon: "./public/favicon.svg",
description: "Build desktop applications using Go & Web Technologies.",
pagefind: true,
customCss: ["./src/stylesheets/extra.css"],
lastUpdated: true, // Note, this needs git clone with fetch depth 0 to work
leaanthony marked this conversation as resolved.
Show resolved Hide resolved
pagination: true,
editLink: {
// TODO: update this
baseUrl: "https://github.com/wailsapp/wails/edit/v3-alpha/docs",
},
social: {
github: "https://github.com/wailsapp/wails",
discord: "https://discord.gg/JDdSxwjhGf",
"x.com": "https://x.com/wailsapp",
},
defaultLocale: "root",
locales: {
root: { label: "English", lang: "en", dir: "ltr" },
// Example of how a new language is added.
// After this, you create a directory named after the language inside content/docs/
// with the same structure as the root language
// eg content/docs/gr/changelog.md or content/docs/gr/api/application.mdx
// gr: { label: "Greek", lang: "el", dir: "ltr" },
},
plugins: [
// https://starlight-links-validator.vercel.app/configuration/
starlightLinksValidator({
exclude: [
// TODO: Fix these links in the blog/wails-v2-released file
"/docs/reference/options#theme",
"/docs/reference/options#customtheme",
"/docs/guides/application-development#application-menu",
"/docs/reference/runtime/dialog",
"/docs/reference/options#windowistranslucent",
"/docs/reference/options#windowistranslucent-1",
"/docs/guides/windows-installer",
"/docs/reference/runtime/intro",
"/docs/guides/obfuscated",
"/docs/howdoesitwork#calling-bound-go-methods",
],
}),
// https://starlight-image-zoom.vercel.app/configuration/
starlightImageZoom(),
// https://starlight-blog-docs.vercel.app/configuration
starlightBlog({
title: "Wails Blog",
authors: authors,
}),
],
sidebar: [
{ label: "Home", link: "/" },
{
label: "Getting Started",
autogenerate: { directory: "getting-started", collapsed: false },
},
{ label: "Feedback", link: "/getting-started/feedback" },
{
label: "Learn",
collapsed: true,
autogenerate: { directory: "learn", collapsed: true },
},
{
label: "Guides",
collapsed: true,
autogenerate: { directory: "guides", collapsed: true },
},
{
label: "What's New",
link: "/whats-new",
badge: { text: "New", variant: "tip" },
},
{
label: "API",
collapsed: true,
autogenerate: { directory: "api", collapsed: true },
},
{
label: "Development",
collapsed: true,
autogenerate: { directory: "development", collapsed: true },
},
{ label: "Status", link: "/status" },
{ label: "Changelog", link: "/changelog" },
{
label: "Sponsor",
link: "https://github.com/sponsors/leaanthony",
badge: { text: "❤️" },
},
{
label: "Credits",
link: "/credits",
badge: { text: "👑" },
},
],
}),
],
});
Loading