Skip to content

Commit

Permalink
Merge pull request #3 from MockBukkit/ci/init
Browse files Browse the repository at this point in the history
  • Loading branch information
thelooter authored Nov 5, 2024
2 parents 3fb9a92 + 45af74e commit c12aee5
Show file tree
Hide file tree
Showing 28 changed files with 2,277 additions and 934 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Build Docs

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions: read-all

jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version:
- "18"
- "20"
- "lts/*"
- "latest"
steps:
- uses: actions/checkout@v4

- name: Get PNPM version from package.json
id: pnpm-version
shell: bash
run: echo "pnpm_version=$(node -p "require('./package.json').engines.pnpm")" >> "$GITHUB_OUTPUT"

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ steps.pnpm-version.outputs.pnpm_version }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Build documentation
run: pnpm run docs:build
47 changes: 47 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions: read-all

jobs:
lint:
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0

- name: Lint Code Base
uses: super-linter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: true
VALIDATE_CSS: false
VALIDATE_CSS_PRETTIER: false
VALIDATE_GIT_COMMITLINT: false
VALIDATE_HTML: false
VALIDATE_HTML_PRETTIER: false
VALIDATE_JAVASCRIPT_ES: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JAVASCRIPT_PRETTIER: false
VALIDATE_TYPESCRIPT_ES: false
VALIDATE_TYPESCRIPT_STANDARD: false
VALIDATE_TYPESCRIPT_PRETTIER: false
VALIDATE_VUE: false
6 changes: 6 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
default: true
MD013:
code_block_line_length: 120
MD025:
front_matter_title: ""
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore artifacts:
build
coverage
.vitepress/cache
.vitepress/dist
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
203 changes: 115 additions & 88 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,101 +1,128 @@
import {defineConfig} from 'vitepress'
import { defineConfig } from "vitepress";

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'Mockbukkit Docs',
description: "Documentation for Mockbukkit, a powerful and flexible Mocking framework for Minecraft plugins.",
title: "Mockbukkit Docs",
description:
"Documentation for Mockbukkit, a powerful and flexible Mocking framework for Minecraft plugins.",

head: [
['link', {rel: 'icon', href: './favicon.ico'}],
head: [["link", { rel: "icon", href: "./favicon.ico" }]],
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Home", link: "/" },
{
text: "Getting Started",
link: "docs/en/user_guide/introduction/getting_started",
},
{
text: "Contribution Guides",
link: "docs/en/contribution/maintainers/pr_guide",
},
],
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{text: 'Home', link: '/'},
{text: 'Getting Started', link: 'docs/en/user_guide/introduction/getting_started'},
{text: 'Contribution Guides', link: 'docs/en/contribution/maintainers/pr_guide'},
],
logo: '/images/mockbukkit_logo.png',
editLink: {
pattern: "https://github.com/MockBukkit/docs/tree/main/:path",
text: "Edit this page on Github!"
logo: "/images/mockbukkit_logo.png",
editLink: {
pattern: "https://github.com/MockBukkit/docs/tree/main/:path",
text: "Edit this page on Github!",
},
search: {
provider: "local",
},
lastUpdated: true,
sidebar: {
"/docs/en/user_guide": [
{
text: "Introduction",
collapsed: false,
items: [
{
text: "Getting Started",
link: "docs/en/user_guide/introduction/getting_started",
},
{
text: "Writing your first test",
link: "docs/en/user_guide/introduction/first_test",
},
{
text: "Create a World Mock",
link: "docs/en/user_guide/introduction/mock_world.md",
},
],
},
search: {
provider: "local"
{
text: "Entities",
collapsed: false,
items: [
{ text: "Entities", link: "docs/en/user_guide/entities/entity" },
{ text: "Player", link: "docs/en/user_guide/entities/player" },
{
text: "MessageTarget",
link: "docs/en/user_guide/entities/message_target",
},
],
},
lastUpdated: true,
sidebar: {
'/docs/en/user_guide': [
{
text: 'Introduction',
collapsed: false,
items: [
{text: 'Getting Started', link: 'docs/en/user_guide/introduction/getting_started'},
{text: 'Writing your first test', link: 'docs/en/user_guide/introduction/first_test'},
{text: 'Create a World Mock', link: 'docs/en/user_guide/introduction/mock_world.md'},
]
},
{
text: "Entities",
collapsed: false,
items: [
{text: 'Entities', link: 'docs/en/user_guide/entities/entity'},
{text: 'Player', link: 'docs/en/user_guide/entities/player'},
{text: 'MessageTarget', link: 'docs/en/user_guide/entities/message_target'},
]
},

{
text: "Advanced Topics",
collapsed: false,
items: [
{
text: "Scheduler",
link: "docs/en/user_guide/advanced/scheduler",
},
{ text: "Events", link: "docs/en/user_guide/advanced/events" },
{
text: "Custom ServerMock",
link: "docs/en/user_guide/advanced/custom_server_mock",
},
{
text: "Adventure",
link: "docs/en/user_guide/advanced/adventure",
},
],
},
{
text: "Migrations",
collapsed: false,
items: [
{
text: "3.x to - 4.x Migration",
link: "docs/en/user_guide/migration/migrate_mockbukkit_4.0",
items: [
{
text: "Advanced Topics",
collapsed: false,
items: [
{text: 'Scheduler', link: 'docs/en/user_guide/advanced/scheduler'},
{text: 'Events', link: 'docs/en/user_guide/advanced/events'},
{text: 'Custom ServerMock', link: 'docs/en/user_guide/advanced/custom_server_mock'},
{text: 'Adventure', link: 'docs/en/user_guide/advanced/adventure'}
]
text: "Migration with OpenRewrite",
link: "docs/en/user_guide/migration/migrate_mockbukkit_4.0_openrewrite",
},
{
text: "Migrations",
collapsed: false,
items: [
{
text: "3.x to - 4.x Migration",
link: "docs/en/user_guide/migration/migrate_mockbukkit_4.0",
items: [
{
text: "Migration with OpenRewrite",
link: "docs/en/user_guide/migration/migrate_mockbukkit_4.0_openrewrite"
}
]
}
]
}
],
'/docs/en/contribution': [
{
text: "For Maintainers",
collapsed: false,
items: [
{text: "Maintainer PR Guide", link: 'docs/en/contribution/maintainers/pr_guide'},
]
}
]
],
},
],
},

socialLinks: [
{icon: 'github', link: 'https://github.com/Mockbukkit/Mockbukkit'},
{icon: 'discord', link: 'https://discord.gg/Xunsn6D8MB'},
],
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2017-2024 Mockbukkit'
}
],
"/docs/en/contribution": [
{
text: "For Maintainers",
collapsed: false,
items: [
{
text: "Maintainer PR Guide",
link: "docs/en/contribution/maintainers/pr_guide",
},
],
},
],
},
ignoreDeadLinks: [
/^https?:\/\/localhost/,

socialLinks: [
{ icon: "github", link: "https://github.com/Mockbukkit/Mockbukkit" },
{ icon: "discord", link: "https://discord.gg/Xunsn6D8MB" },
],
vite: {
publicDir: "./public"
}
})
footer: {
message: "Released under the MIT License.",
copyright: "Copyright © 2017-2024 Mockbukkit",
},
},
ignoreDeadLinks: [/^https?:\/\/localhost/],
vite: {
publicDir: "./public",
},
});
14 changes: 7 additions & 7 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './style.css'
import { h } from "vue";
import type { Theme } from "vitepress";
import DefaultTheme from "vitepress/theme";
import "./style.css";

export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
});
},
enhanceApp({ app, router, siteData }) {
// ...
}
} satisfies Theme
},
} satisfies Theme;
3 changes: 1 addition & 2 deletions .vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* in custom container, badges, etc.
* -------------------------------------------------------------------------- */

:root {
:root {
--vp-c-default-1: var(--vp-c-gray-1);
--vp-c-default-2: var(--vp-c-gray-2);
--vp-c-default-3: var(--vp-c-gray-3);
Expand Down Expand Up @@ -136,4 +136,3 @@
.DocSearch {
--docsearch-primary-color: var(--vp-c-brand-1) !important;
}

Loading

0 comments on commit c12aee5

Please sign in to comment.