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

migrate website to Astro. #289

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 4 additions & 13 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,17 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install node module
run: |
npm install -D --save autoprefixer
npm install -D --save postcss-cli
npm audit fix

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.125.4'
extended: true
- name: Install node modules
run: npm install

- name: Build
run: |
hugo --minify
npm run build
echo 'gin-gonic.com' > public/CNAME

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_dir: ./dist
25 changes: 21 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,24 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

public
resources
node_modules
.hugo_build.lock
# 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
9 changes: 0 additions & 9 deletions assets/scss/_variables_project.scss

This file was deleted.

98 changes: 98 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightUtils from "@lorenzo_lewis/starlight-utils";

// https://astro.build/config
export default defineConfig({

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'],
},

editLink: {
baseUrl: 'https://github.com/gin-gonic/website/edit/master/',
},

lastUpdated: true,
credits: false, // Opcional
}),
],
});
77 changes: 0 additions & 77 deletions content/en/_index.html

This file was deleted.

13 changes: 0 additions & 13 deletions content/en/blog/_index.md

This file was deleted.

8 changes: 0 additions & 8 deletions content/en/blog/news/_index.md

This file was deleted.

8 changes: 0 additions & 8 deletions content/en/blog/releases/_index.md

This file was deleted.

24 changes: 0 additions & 24 deletions content/en/docs/_index.md

This file was deleted.

47 changes: 0 additions & 47 deletions content/en/docs/benchmarks/_index.md

This file was deleted.

31 changes: 0 additions & 31 deletions content/en/docs/deployment/_index.md

This file was deleted.

7 changes: 0 additions & 7 deletions content/en/docs/examples/_index.md

This file was deleted.

Loading