Skip to content

Commit c12aee5

Browse files
authored
Merge pull request #3 from MockBukkit/ci/init
2 parents 3fb9a92 + 45af74e commit c12aee5

28 files changed

+2277
-934
lines changed

.github/workflows/build.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Build Docs
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
12+
permissions: read-all
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-22.04
17+
strategy:
18+
matrix:
19+
node-version:
20+
- "18"
21+
- "20"
22+
- "lts/*"
23+
- "latest"
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Get PNPM version from package.json
28+
id: pnpm-version
29+
shell: bash
30+
run: echo "pnpm_version=$(node -p "require('./package.json').engines.pnpm")" >> "$GITHUB_OUTPUT"
31+
32+
- name: Install pnpm
33+
uses: pnpm/action-setup@v4
34+
with:
35+
version: ${{ steps.pnpm-version.outputs.pnpm_version }}
36+
37+
- name: Use Node.js ${{ matrix.node-version }}
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: ${{ matrix.node-version }}
41+
cache: "pnpm"
42+
43+
- name: Install dependencies
44+
run: pnpm install
45+
46+
- name: Build documentation
47+
run: pnpm run docs:build

.github/workflows/lint.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Lint
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
12+
permissions: read-all
13+
14+
jobs:
15+
lint:
16+
runs-on: ubuntu-latest
17+
18+
permissions:
19+
contents: read
20+
packages: read
21+
statuses: write
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
with:
27+
# super-linter needs the full git history to get the
28+
# list of files that changed across commits
29+
fetch-depth: 0
30+
31+
- name: Lint Code Base
32+
uses: super-linter/[email protected]
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: true
36+
VALIDATE_CSS: false
37+
VALIDATE_CSS_PRETTIER: false
38+
VALIDATE_GIT_COMMITLINT: false
39+
VALIDATE_HTML: false
40+
VALIDATE_HTML_PRETTIER: false
41+
VALIDATE_JAVASCRIPT_ES: false
42+
VALIDATE_JAVASCRIPT_STANDARD: false
43+
VALIDATE_JAVASCRIPT_PRETTIER: false
44+
VALIDATE_TYPESCRIPT_ES: false
45+
VALIDATE_TYPESCRIPT_STANDARD: false
46+
VALIDATE_TYPESCRIPT_PRETTIER: false
47+
VALIDATE_VUE: false

.markdownlint.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
default: true
3+
MD013:
4+
code_block_line_length: 120
5+
MD025:
6+
front_matter_title: ""

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore artifacts:
2+
build
3+
coverage
4+
.vitepress/cache
5+
.vitepress/dist

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.vitepress/config.mts

Lines changed: 115 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,128 @@
1-
import {defineConfig} from 'vitepress'
1+
import { defineConfig } from "vitepress";
22

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

8-
head: [
9-
['link', {rel: 'icon', href: './favicon.ico'}],
9+
head: [["link", { rel: "icon", href: "./favicon.ico" }]],
10+
themeConfig: {
11+
// https://vitepress.dev/reference/default-theme-config
12+
nav: [
13+
{ text: "Home", link: "/" },
14+
{
15+
text: "Getting Started",
16+
link: "docs/en/user_guide/introduction/getting_started",
17+
},
18+
{
19+
text: "Contribution Guides",
20+
link: "docs/en/contribution/maintainers/pr_guide",
21+
},
1022
],
11-
themeConfig: {
12-
// https://vitepress.dev/reference/default-theme-config
13-
nav: [
14-
{text: 'Home', link: '/'},
15-
{text: 'Getting Started', link: 'docs/en/user_guide/introduction/getting_started'},
16-
{text: 'Contribution Guides', link: 'docs/en/contribution/maintainers/pr_guide'},
17-
],
18-
logo: '/images/mockbukkit_logo.png',
19-
editLink: {
20-
pattern: "https://github.com/MockBukkit/docs/tree/main/:path",
21-
text: "Edit this page on Github!"
23+
logo: "/images/mockbukkit_logo.png",
24+
editLink: {
25+
pattern: "https://github.com/MockBukkit/docs/tree/main/:path",
26+
text: "Edit this page on Github!",
27+
},
28+
search: {
29+
provider: "local",
30+
},
31+
lastUpdated: true,
32+
sidebar: {
33+
"/docs/en/user_guide": [
34+
{
35+
text: "Introduction",
36+
collapsed: false,
37+
items: [
38+
{
39+
text: "Getting Started",
40+
link: "docs/en/user_guide/introduction/getting_started",
41+
},
42+
{
43+
text: "Writing your first test",
44+
link: "docs/en/user_guide/introduction/first_test",
45+
},
46+
{
47+
text: "Create a World Mock",
48+
link: "docs/en/user_guide/introduction/mock_world.md",
49+
},
50+
],
2251
},
23-
search: {
24-
provider: "local"
52+
{
53+
text: "Entities",
54+
collapsed: false,
55+
items: [
56+
{ text: "Entities", link: "docs/en/user_guide/entities/entity" },
57+
{ text: "Player", link: "docs/en/user_guide/entities/player" },
58+
{
59+
text: "MessageTarget",
60+
link: "docs/en/user_guide/entities/message_target",
61+
},
62+
],
2563
},
26-
lastUpdated: true,
27-
sidebar: {
28-
'/docs/en/user_guide': [
29-
{
30-
text: 'Introduction',
31-
collapsed: false,
32-
items: [
33-
{text: 'Getting Started', link: 'docs/en/user_guide/introduction/getting_started'},
34-
{text: 'Writing your first test', link: 'docs/en/user_guide/introduction/first_test'},
35-
{text: 'Create a World Mock', link: 'docs/en/user_guide/introduction/mock_world.md'},
36-
]
37-
},
38-
{
39-
text: "Entities",
40-
collapsed: false,
41-
items: [
42-
{text: 'Entities', link: 'docs/en/user_guide/entities/entity'},
43-
{text: 'Player', link: 'docs/en/user_guide/entities/player'},
44-
{text: 'MessageTarget', link: 'docs/en/user_guide/entities/message_target'},
45-
]
46-
},
4764

65+
{
66+
text: "Advanced Topics",
67+
collapsed: false,
68+
items: [
69+
{
70+
text: "Scheduler",
71+
link: "docs/en/user_guide/advanced/scheduler",
72+
},
73+
{ text: "Events", link: "docs/en/user_guide/advanced/events" },
74+
{
75+
text: "Custom ServerMock",
76+
link: "docs/en/user_guide/advanced/custom_server_mock",
77+
},
78+
{
79+
text: "Adventure",
80+
link: "docs/en/user_guide/advanced/adventure",
81+
},
82+
],
83+
},
84+
{
85+
text: "Migrations",
86+
collapsed: false,
87+
items: [
88+
{
89+
text: "3.x to - 4.x Migration",
90+
link: "docs/en/user_guide/migration/migrate_mockbukkit_4.0",
91+
items: [
4892
{
49-
text: "Advanced Topics",
50-
collapsed: false,
51-
items: [
52-
{text: 'Scheduler', link: 'docs/en/user_guide/advanced/scheduler'},
53-
{text: 'Events', link: 'docs/en/user_guide/advanced/events'},
54-
{text: 'Custom ServerMock', link: 'docs/en/user_guide/advanced/custom_server_mock'},
55-
{text: 'Adventure', link: 'docs/en/user_guide/advanced/adventure'}
56-
]
93+
text: "Migration with OpenRewrite",
94+
link: "docs/en/user_guide/migration/migrate_mockbukkit_4.0_openrewrite",
5795
},
58-
{
59-
text: "Migrations",
60-
collapsed: false,
61-
items: [
62-
{
63-
text: "3.x to - 4.x Migration",
64-
link: "docs/en/user_guide/migration/migrate_mockbukkit_4.0",
65-
items: [
66-
{
67-
text: "Migration with OpenRewrite",
68-
link: "docs/en/user_guide/migration/migrate_mockbukkit_4.0_openrewrite"
69-
}
70-
]
71-
}
72-
]
73-
}
74-
],
75-
'/docs/en/contribution': [
76-
{
77-
text: "For Maintainers",
78-
collapsed: false,
79-
items: [
80-
{text: "Maintainer PR Guide", link: 'docs/en/contribution/maintainers/pr_guide'},
81-
]
82-
}
83-
]
96+
],
97+
},
98+
],
8499
},
85-
86-
socialLinks: [
87-
{icon: 'github', link: 'https://github.com/Mockbukkit/Mockbukkit'},
88-
{icon: 'discord', link: 'https://discord.gg/Xunsn6D8MB'},
89-
],
90-
footer: {
91-
message: 'Released under the MIT License.',
92-
copyright: 'Copyright © 2017-2024 Mockbukkit'
93-
}
100+
],
101+
"/docs/en/contribution": [
102+
{
103+
text: "For Maintainers",
104+
collapsed: false,
105+
items: [
106+
{
107+
text: "Maintainer PR Guide",
108+
link: "docs/en/contribution/maintainers/pr_guide",
109+
},
110+
],
111+
},
112+
],
94113
},
95-
ignoreDeadLinks: [
96-
/^https?:\/\/localhost/,
114+
115+
socialLinks: [
116+
{ icon: "github", link: "https://github.com/Mockbukkit/Mockbukkit" },
117+
{ icon: "discord", link: "https://discord.gg/Xunsn6D8MB" },
97118
],
98-
vite: {
99-
publicDir: "./public"
100-
}
101-
})
119+
footer: {
120+
message: "Released under the MIT License.",
121+
copyright: "Copyright © 2017-2024 Mockbukkit",
122+
},
123+
},
124+
ignoreDeadLinks: [/^https?:\/\/localhost/],
125+
vite: {
126+
publicDir: "./public",
127+
},
128+
});

.vitepress/theme/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// https://vitepress.dev/guide/custom-theme
2-
import { h } from 'vue'
3-
import type { Theme } from 'vitepress'
4-
import DefaultTheme from 'vitepress/theme'
5-
import './style.css'
2+
import { h } from "vue";
3+
import type { Theme } from "vitepress";
4+
import DefaultTheme from "vitepress/theme";
5+
import "./style.css";
66

77
export default {
88
extends: DefaultTheme,
99
Layout: () => {
1010
return h(DefaultTheme.Layout, null, {
1111
// https://vitepress.dev/guide/extending-default-theme#layout-slots
12-
})
12+
});
1313
},
1414
enhanceApp({ app, router, siteData }) {
1515
// ...
16-
}
17-
} satisfies Theme
16+
},
17+
} satisfies Theme;

.vitepress/theme/style.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* in custom container, badges, etc.
4444
* -------------------------------------------------------------------------- */
4545

46-
:root {
46+
:root {
4747
--vp-c-default-1: var(--vp-c-gray-1);
4848
--vp-c-default-2: var(--vp-c-gray-2);
4949
--vp-c-default-3: var(--vp-c-gray-3);
@@ -136,4 +136,3 @@
136136
.DocSearch {
137137
--docsearch-primary-color: var(--vp-c-brand-1) !important;
138138
}
139-

0 commit comments

Comments
 (0)