Skip to content

Commit 3eea97a

Browse files
authored
Merge pull request #1 from imlargo/migration
Migration
2 parents e1234b5 + 2e860e7 commit 3eea97a

File tree

614 files changed

+9292
-7008
lines changed

Some content is hidden

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

614 files changed

+9292
-7008
lines changed

Diff for: .gitignore

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# environment variables
2+
.env
3+
.env.production
4+
5+
# macOS-specific files
6+
.DS_Store
7+
18
# Binaries for programs and plugins
29
*.exe
310
*.exe~
@@ -23,12 +30,4 @@ node_modules/
2330
npm-debug.log*
2431
yarn-debug.log*
2532
yarn-error.log*
26-
pnpm-debug.log*
27-
28-
29-
# environment variables
30-
.env
31-
.env.production
32-
33-
# macOS-specific files
34-
.DS_Store
33+
pnpm-debug.log*

Diff for: README.md

+38-34
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,54 @@
1+
# Starlight Starter Kit: Basics
12

2-
# Gin website
3+
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
34

4-
[![Run Deploy](https://github.com/gin-gonic/website/actions/workflows/node.yml/badge.svg)](https://github.com/gin-gonic/website/actions/workflows/node.yml)
5-
6-
Welcome! This repository houses all the assets required to build the Gin website and documentation. We're pleased that you want to contribute! The website is hosted at https://gin-gonic.com.
7-
8-
We use [Hugo](https://gohugo.io/) to format and generate our website, the [Docsy](https://github.com/google/docsy) theme for styling and site structure. Thanks!.
9-
10-
**Note:** We only support hugo [v0.75.1 version](https://github.com/gohugoio/hugo/releases/tag/v0.75.1).
5+
```
6+
npm create astro@latest -- --template starlight
7+
```
118

12-
## Contribution
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)
1313

14-
- Fork the repository
14+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
1515
16-
You can click the Fork button in the upper-right area of the screen to create a copy of this repository in your GitHub account. This copy is called as fork.
16+
## 🚀 Project Structure
1717

18-
> You need to use the below command to clone code for docsy theme.
18+
Inside of your Astro + Starlight project, you'll see the following folders and files:
1919

20-
```sh
21-
git clone --recurse-submodules --depth 1 https://github.com/google/docsy.git themes/docsy
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
2231
```
2332

24-
- Create one pull request
25-
26-
Make any changes you want in your fork, and when you are ready to send those changes to us, go to your fork and create a new pull request to let us know about it.
27-
28-
- Merge the pull request
29-
30-
Once your pull request is created, a Gin reviewer will take responsibility for providing clear, actionable feedback, re-improve and merge.
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.
3134

32-
## Running
35+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
3336

34-
See the [official Hugo documentation](https://gohugo.io/getting-started/installing/) for Hugo installation instructions.
37+
Static assets, like favicons, can be placed in the `public/` directory.
3538

36-
To run the site locally when you have Hugo installed:
39+
## 🧞 Commands
3740

38-
```sh
39-
# If use `hugo` command, you need to use `npm install` command
40-
$ npm install
41-
$ hugo
42-
# Or use `hugo server`, it not need `npm install` command
43-
$ hugo server
44-
```
41+
All commands are run from the root of the project, from a terminal:
4542

46-
This will start the local Hugo server on port 1313. Open up your browser to http://localhost:1313 to view the site. As you make changes to the source files, Hugo updates the site and forces a browser refresh.
43+
| Command | Action |
44+
| :------------------------ | :----------------------------------------------- |
45+
| `npm install` | Installs dependencies |
46+
| `npm run dev` | Starts local dev server at `localhost:4321` |
47+
| `npm run build` | Build your production site to `./dist/` |
48+
| `npm run preview` | Preview your build locally, before deploying |
49+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
50+
| `npm run astro -- --help` | Get help using the Astro CLI |
4751

48-
## Thanks
52+
## 👀 Want to learn more?
4953

50-
Gin thrives on community participation, and we really appreciate your contributions to our site and our documentation!
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).

Diff for: astro.config.mjs

+83-88
Original file line numberDiff line numberDiff line change
@@ -3,96 +3,91 @@ import { defineConfig } from 'astro/config';
33
import starlight from '@astrojs/starlight';
44
import starlightUtils from "@lorenzo_lewis/starlight-utils";
55

6+
import sitemap from "@astrojs/sitemap";
7+
68
// https://astro.build/config
79
export default defineConfig({
10+
integrations: [starlight({
11+
plugins: [starlightUtils({
12+
multiSidebar: {
13+
switcherStyle: "horizontalList",
14+
},
15+
})],
816

9-
integrations: [
10-
starlight({
11-
plugins: [starlightUtils({
12-
multiSidebar: {
13-
switcherStyle: "horizontalList",
14-
},
15-
})],
16-
17-
title: 'Gin Web Framework',
18-
favicon: '/favicon.ico',
19-
logo: {
20-
src: "./src/assets/gin.png",
21-
},
22-
23-
defaultLocale: 'en',
24-
locales: {
25-
'en': {
26-
label: 'English',
27-
lang: 'en',
28-
},
29-
'es': {
30-
label: 'Español',
31-
lang: 'es',
32-
},
33-
"fa": {
34-
label: "Persian",
35-
lang: "fa",
36-
},
37-
"ja": {
38-
label: "日本語",
39-
lang: "ja",
40-
},
41-
"ko-kr": {
42-
label: "한국어",
43-
lang: "ko-kr",
44-
},
45-
"pt": {
46-
label: "Português",
47-
lang: "pt",
48-
},
49-
"ru": {
50-
label: "Russian",
51-
lang: "ru",
52-
},
53-
"tr": {
54-
label: "Turkish",
55-
lang: "tr",
56-
},
57-
"zh-cn": {
58-
label: "简体中文",
59-
lang: "zh-cn",
60-
},
61-
"zh-tw": {
62-
label: "繁體中文",
63-
lang: "zh-tw",
64-
},
65-
},
66-
67-
social: {
68-
github: 'https://github.com/gin-gonic/gin',
69-
gitter: "https://gitter.im/gin-gonic/gin"
70-
},
71-
sidebar: [
72-
{
73-
label: "Docs",
74-
autogenerate: { directory: "docs" }
75-
},
76-
{
77-
label: "Blog",
78-
autogenerate: { directory: "blog" }
79-
},
80-
],
81-
82-
customCss: [
83-
'./src/styles/custom.css',
84-
],
85-
86-
expressiveCode: {
87-
themes: ['github-dark', 'github-light'],
88-
},
17+
title: 'Gin Web Framework',
18+
favicon: '/favicon.ico',
19+
logo: {
20+
src: "./src/assets/gin.png",
21+
},
8922

90-
editLink: {
91-
baseUrl: 'https://github.com/gin-gonic/website/edit/master/',
92-
},
23+
defaultLocale: 'en',
24+
locales: {
25+
'en': {
26+
label: 'English',
27+
lang: 'en',
28+
},
29+
'es': {
30+
label: 'Español',
31+
lang: 'es',
32+
},
33+
"fa": {
34+
label: "Persian",
35+
lang: "fa",
36+
},
37+
"ja": {
38+
label: "日本語",
39+
lang: "ja",
40+
},
41+
"ko-kr": {
42+
label: "한국어",
43+
lang: "ko-kr",
44+
},
45+
"pt": {
46+
label: "Português",
47+
lang: "pt",
48+
},
49+
"ru": {
50+
label: "Russian",
51+
lang: "ru",
52+
},
53+
"tr": {
54+
label: "Turkish",
55+
lang: "tr",
56+
},
57+
"zh-cn": {
58+
label: "简体中文",
59+
lang: "zh-cn",
60+
},
61+
"zh-tw": {
62+
label: "繁體中文",
63+
lang: "zh-tw",
64+
},
65+
},
9366

94-
lastUpdated: true,
95-
credits: false, // Opcional
96-
}),
97-
],
98-
});
67+
social: {
68+
github: 'https://github.com/gin-gonic/gin',
69+
gitter: "https://gitter.im/gin-gonic/gin"
70+
},
71+
sidebar: [
72+
{
73+
label: "Docs",
74+
autogenerate: { directory: "docs" }
75+
},
76+
{
77+
label: "Blog",
78+
autogenerate: { directory: "blog" }
79+
},
80+
],
81+
expressiveCode: {
82+
themes: ['github-dark', 'github-light'],
83+
},
84+
editLink: {
85+
baseUrl: 'https://github.com/gin-gonic/website/edit/master/',
86+
},
87+
customCss: [
88+
'./src/styles/custom.css',
89+
],
90+
lastUpdated: true,
91+
credits: false, // Opcional
92+
}), sitemap()],
93+
});

0 commit comments

Comments
 (0)