Skip to content

Commit

Permalink
Merge pull request #2 from minecraft-essentials/development
Browse files Browse the repository at this point in the history
New Redesign of site
  • Loading branch information
Eveeifyeve authored Jan 30, 2024
2 parents 7bbab25 + d9ee71f commit 20eebdd
Show file tree
Hide file tree
Showing 30 changed files with 667 additions and 120 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [ main ]
branches: [ stable ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run check
7 changes: 7 additions & 0 deletions .textlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": {},
"filters": {},
"rules": {
"no-todo": true
}
}
212 changes: 133 additions & 79 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,87 +1,141 @@
import react from "@astrojs/react";
import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";

import tailwind from "@astrojs/tailwind";
import { defineConfig } from "astro/config";

// https://astro.build/config
export default defineConfig({
site: "https://minecraft-essentials.pages.github.io/",
redirects: {
"/docsrs": "https://docs.rs/minecraft-essentials/",
"/cratesio": "https://crates.io/minecraft-essentials/",
"/github": "https://github.com/minecraft-essentials",
},

site: 'https://minecraft-essentials.pages.github.io/',






integrations: [
react(),
tailwind({ applyBaseStyles: false }),
starlight({
title: "Minecraft-Essentials",
customCss: ["./src/styles/tailwind.css"],
social: {
github: "https://github.com/minecraft-essentials/minecraft-essentials",
},
defaultLocale: "root",
locales: {
root: {
label: "English",
lang: "en",
},
es: {
label: "Español",
},
zh: {
label: "中文",
},
hi: {
label: "हिन्दी",
},
ar: {
label: "العربية",
},
},
sidebar: [
{
label: "Infomation",
autogenerate: {
directory: "infomation",
},
},
{
label: "NPM Documentation",
autogenerate: {
directory: "npm",
},
},
{
label: "Rust Documenation",
items: [
{
label: "Getting Started",
link: "https://docs.rs/minecraft-essentials/",
},
{
label: "Oauth",
link: "https://docs.rs/minecraft-essentials/oauth",
},
],
},
{
label: "Featured Clients",
items: [
{
label: "TeaClient",
link: "https://teaclient.net",
},
{
label: "OpusClient",
link: "https://opusclient.com",
},
],
},
],
}),
],
integrations: [
react(),
tailwind({
applyBaseStyles: false,
}),
starlight({
title: "Minecraft-Essentials",
customCss: ["./src/styles/tailwind.css"],
social: {
github: "https://github.com/minecraft-essentials/minecraft-essentials",
},
defaultLocale: "root",
locales: {
root: {
label: "English",
lang: "en",
},
es: {
label: "Español",
},
zh: {
label: "中文",
},
hi: {
label: "हिन्दी",
},
ar: {
label: "العربية",
},
},
sidebar: [
{
label: "Infomation",
items: [
{
label: "Introduction",
link: "/infomation/intro/",
},
{
label: "Contribute",
link: "/infomation/contribute/",
badge: {
text: "Experiemental",
variant: "caution",
},
},
],
},
{
label: "Documentation",
items: [
{
label: "Installation",
link: "/guides/install/",
},
{
label: "OAuth",
link: "/guides/oauth/",
badge: {
text: "Recomended!",
variant: "success",
},
},
{
label: "DeviceCode",
link: "/guides/device_code/",
badge: {
text: "Secure!",
variant: "note",
},
},
{
label: "Launching",
link: "/guides/launching",
badge: {
text: "Experimental",
variant: "caution",
},
},
],
},
{
label: "Resources",
items: [
{
label: "Docs.rs",
link: "https://docs.rs/minecraft-essentials/",
},
{
label: "Crates.io",
link: "https://crates.io/minecraft-essentials/",
},
],
},
{
label: "Minecraft Clients",
items: [
{
label: "TeaClient",
link: "https://teaclient.net",
badge: {
text: "Featured!",
variant: "default",
},
},
{
label: "OpusClient",
link: "https://opusclient.com",
},
],
},
],
components: {
SiteTitle: "./src/components/starlight/SiteTitle.astro",
},
}),
],
compressHTML: true,
cacheDir: "./src",
vite: {
resolve: {
alias: {
"@src": "/src",
},
},
},
});
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "website",
"type": "module",
"version": "0.0.1",
"version": "0.0.7",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"fmt": "bunx @biomejs/biome format . --write",
"lint": "bunx @biomejs/biome lint . --apply",
"check": "bunx @biomejs/biome check --apply-unsafe .",
"dev": "astro dev --bun ",
"start": "astro dev --bun ",
"build": "astro check --bun && astro build --bun ",
"preview": "astro preview --bun ",
"astro": "astro --bun ",
"fmt": "biome format . --write",
"lint": "biome lint . --apply",
"check": "biome check --apply-unsafe .",
"postinstall": "bunx husky install"
},
"dependencies": {
Expand All @@ -22,14 +22,18 @@
"@astrojs/tailwind": "^5.1.0",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"astro": "^4.0.1",
"astro": "^4.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sharp": "^0.32.5",
"sharp": "^0.33.2",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"
},
"devDependencies": {
"@biomejs/biome": "1.5.2"
"@biomejs/biome": "1.5.2",
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"textlint": "^13.4.1",
"textlint-rule-no-todo": "^2.0.1"
}
}
Binary file removed src/assets/houston.webp
Binary file not shown.
26 changes: 26 additions & 0 deletions src/assets/svgs/bun.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/svgs/npm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/assets/svgs/yarn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions src/components/docs/LanguageTabs.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
import Tabs from './Tabs.astro';
import { TabItem } from '@astrojs/starlight/components';
---

<Tabs group="languages">
<TabItem label='Rust'>
For extended documentation check <a href="/docsrs">docs.rs</a>
<slot name="rs" />
</TabItem>
<TabItem label='TypeScript'>
<slot name="ts" />
</TabItem>
<TabItem label='JavaScript'>
<slot name="js" />
</TabItem>
</Tabs>
22 changes: 22 additions & 0 deletions src/components/docs/PackageMangerTabs.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
import Tabs from './Tabs.astro';
import { TabItem } from '@astrojs/starlight/components';
---

<Tabs group="package-managers">
<TabItem label="Cargo">
<slot name="cargo" />
</TabItem>
<TabItem label="Bun">
<slot name="bun" />
</TabItem>
<TabItem label="Yarn">
<slot name="yarn" />
</TabItem>
<TabItem label="pnpm">
<slot name="pnpm" />
</TabItem>
<TabItem label="npm">
<slot name="npm" />
</TabItem>
</Tabs>
Loading

0 comments on commit 20eebdd

Please sign in to comment.