Skip to content

Migration #1

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

Merged
merged 24 commits into from
Apr 3, 2025
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e137c68
Remove unused assets and update project configuration
imlargo Apr 3, 2025
107446d
Add custom CSS styles for dark and light themes
imlargo Apr 3, 2025
b35ba2f
copy docs
imlargo Apr 3, 2025
a56d3bd
Update .gitignore to include migrate.sh and old-docs/
imlargo Apr 3, 2025
d08bdef
Add multilingual support for news and releases documentation
imlargo Apr 3, 2025
b577de0
Update release documentation to use lastUpdated field instead of date
imlargo Apr 3, 2025
2e37afb
Remove linkTitle from blog, news, releases, and documentation pages f…
imlargo Apr 3, 2025
f2fa643
Remove draft field from FAQ and user documentation across multiple la…
imlargo Apr 3, 2025
ca72cb6
Fix title field translations in Russian documentation
imlargo Apr 3, 2025
25ba6c8
Remove unnecessary empty lines from blog news and releases documentat…
imlargo Apr 3, 2025
ad2f819
Update code blocks in curl examples to specify language for better re…
imlargo Apr 3, 2025
a4ee3b3
Remove draft field from cookie and log examples across multiple langu…
imlargo Apr 3, 2025
4d9aa33
Remove 'News' section from blog documentation across multiple languages
imlargo Apr 3, 2025
38cdec9
Remove 'Releases' section from blog documentation across multiple lan…
imlargo Apr 3, 2025
08ffd59
Update curl example to use bash syntax for improved clarity
imlargo Apr 3, 2025
88a6145
Add sitemap integration and update package dependencies
imlargo Apr 3, 2025
8c2a0cf
Remove VSCode configuration files for extensions and launch settings
imlargo Apr 3, 2025
d439dd6
Refactor sidebar configuration in blog and documentation sections acr…
imlargo Apr 3, 2025
33174ec
Update sidebar configuration for multiple language documentation
imlargo Apr 3, 2025
5b900db
Update date formatting in HTML rendering examples across multiple lan…
imlargo Apr 3, 2025
725520b
Update date formatting in multiple language documentation examples
imlargo Apr 3, 2025
0773f85
Fix date formatting in security headers examples across multiple lang…
imlargo Apr 3, 2025
2528aa5
Remove unnecessary blank lines across multiple languages
imlargo Apr 3, 2025
2e860e7
Update documentation examples for consistency across multiple languages
imlargo Apr 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 8 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# Binaries for programs and plugins
*.exe
*.exe~
@@ -23,12 +30,4 @@ node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
pnpm-debug.log*
72 changes: 38 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
# Starlight Starter Kit: Basics

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

[![Run Deploy](https://github.com/gin-gonic/website/actions/workflows/node.yml/badge.svg)](https://github.com/gin-gonic/website/actions/workflows/node.yml)

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.

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!.

**Note:** We only support hugo [v0.75.1 version](https://github.com/gohugoio/hugo/releases/tag/v0.75.1).
```
npm create astro@latest -- --template starlight
```

## Contribution
[![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)

- Fork the repository
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!

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.
## 🚀 Project Structure

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

```sh
git clone --recurse-submodules --depth 1 https://github.com/google/docsy.git themes/docsy
```
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ └── content.config.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
```

- Create one pull request

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.

- Merge the pull request

Once your pull request is created, a Gin reviewer will take responsibility for providing clear, actionable feedback, re-improve and merge.
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.

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

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

To run the site locally when you have Hugo installed:
## 🧞 Commands

```sh
# If use `hugo` command, you need to use `npm install` command
$ npm install
$ hugo
# Or use `hugo server`, it not need `npm install` command
$ hugo server
```
All commands are run from the root of the project, from a terminal:

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.
| 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 |

## Thanks
## 👀 Want to learn more?

Gin thrives on community participation, and we really appreciate your contributions to our site and our documentation!
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).
171 changes: 83 additions & 88 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -3,96 +3,91 @@ import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightUtils from "@lorenzo_lewis/starlight-utils";

import sitemap from "@astrojs/sitemap";

// https://astro.build/config
export default defineConfig({
integrations: [starlight({
plugins: [starlightUtils({
multiSidebar: {
switcherStyle: "horizontalList",
},
})],

integrations: [
starlight({
plugins: [starlightUtils({
multiSidebar: {
switcherStyle: "horizontalList",
},
})],

title: 'Gin Web Framework',
favicon: '/favicon.ico',
logo: {
src: "./src/assets/gin.png",
},

defaultLocale: 'en',
locales: {
'en': {
label: 'English',
lang: 'en',
},
'es': {
label: 'Español',
lang: 'es',
},
"fa": {
label: "Persian",
lang: "fa",
},
"ja": {
label: "日本語",
lang: "ja",
},
"ko-kr": {
label: "한국어",
lang: "ko-kr",
},
"pt": {
label: "Português",
lang: "pt",
},
"ru": {
label: "Russian",
lang: "ru",
},
"tr": {
label: "Turkish",
lang: "tr",
},
"zh-cn": {
label: "简体中文",
lang: "zh-cn",
},
"zh-tw": {
label: "繁體中文",
lang: "zh-tw",
},
},

social: {
github: 'https://github.com/gin-gonic/gin',
gitter: "https://gitter.im/gin-gonic/gin"
},
sidebar: [
{
label: "Docs",
autogenerate: { directory: "docs" }
},
{
label: "Blog",
autogenerate: { directory: "blog" }
},
],

customCss: [
'./src/styles/custom.css',
],

expressiveCode: {
themes: ['github-dark', 'github-light'],
},
title: 'Gin Web Framework',
favicon: '/favicon.ico',
logo: {
src: "./src/assets/gin.png",
},

editLink: {
baseUrl: 'https://github.com/gin-gonic/website/edit/master/',
},
defaultLocale: 'en',
locales: {
'en': {
label: 'English',
lang: 'en',
},
'es': {
label: 'Español',
lang: 'es',
},
"fa": {
label: "Persian",
lang: "fa",
},
"ja": {
label: "日本語",
lang: "ja",
},
"ko-kr": {
label: "한국어",
lang: "ko-kr",
},
"pt": {
label: "Português",
lang: "pt",
},
"ru": {
label: "Russian",
lang: "ru",
},
"tr": {
label: "Turkish",
lang: "tr",
},
"zh-cn": {
label: "简体中文",
lang: "zh-cn",
},
"zh-tw": {
label: "繁體中文",
lang: "zh-tw",
},
},

lastUpdated: true,
credits: false, // Opcional
}),
],
});
social: {
github: 'https://github.com/gin-gonic/gin',
gitter: "https://gitter.im/gin-gonic/gin"
},
sidebar: [
{
label: "Docs",
autogenerate: { directory: "docs" }
},
{
label: "Blog",
autogenerate: { directory: "blog" }
},
],
expressiveCode: {
themes: ['github-dark', 'github-light'],
},
editLink: {
baseUrl: 'https://github.com/gin-gonic/website/edit/master/',
},
customCss: [
'./src/styles/custom.css',
],
lastUpdated: true,
credits: false, // Opcional
}), sitemap()],
});
Loading