Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
dda898c
feat: start rewriting with Starlight
zlataovce Apr 7, 2025
13845a1
feat: more pages, add a pretty footer
zlataovce Apr 8, 2025
f41dc6c
feat: Waterfall, destructive banner
zlataovce Apr 8, 2025
2af25cf
feat: Folia
zlataovce Apr 8, 2025
36adc71
feat: destructive link card
zlataovce Apr 8, 2025
a0d1cd5
feat: some pages from misc
zlataovce Apr 8, 2025
ad8dac1
feat: patch in project icons
zlataovce Apr 9, 2025
e09a5bd
feat: Javadoc remark plugin
zlataovce Apr 9, 2025
d7492d1
feat: more pages
zlataovce Apr 9, 2025
234e396
feat: Velocity API pages
zlataovce Apr 9, 2025
79cde43
chore: match accent colors with website
zlataovce Apr 9, 2025
d3bd4c9
chore: replace externally hosted images
kashike Apr 9, 2025
847a5ed
refactor: constant replacement for code blocks
zlataovce Apr 10, 2025
ac310d4
feat: some Paper dev pages
zlataovce Apr 10, 2025
0f7fb5c
fix: make content wider on large screens
zlataovce Apr 10, 2025
febbe9a
feat: page cards for index pages
zlataovce Apr 10, 2025
7133385
feat: index pages, permissions, rewrite CONTRIBUTING.md
zlataovce Apr 11, 2025
4590803
feat: replace mermaid with D2
zlataovce Apr 11, 2025
ae749ff
fix: don't spellcheck D2 output
zlataovce Apr 11, 2025
d9c50d5
feat: configuration pages
zlataovce Apr 11, 2025
8e404bc
fix: remove placeholders in config specs
zlataovce Apr 11, 2025
97fe17d
chore: color corrections
zlataovce Apr 11, 2025
861bc0b
fix(config): split array values correctly
zlataovce Apr 11, 2025
a02d9a7
feat: Paper API pages
zlataovce Apr 12, 2025
69f3994
fix: broken links
zlataovce Apr 12, 2025
d26e667
chore: re-enable tracking
zlataovce Apr 12, 2025
733ee1c
fix: oversights, re-add vanilla guide
zlataovce Apr 12, 2025
15d7b79
fix: remove background from diagrams, adjust image size
zlataovce Apr 12, 2025
1d3fe70
feat: start script generator
zlataovce Apr 12, 2025
eb79022
feat: new pages from rebase
zlataovce Apr 13, 2025
1dc52e4
feat: version tag, redirects, fix codeblock line highlights
zlataovce Apr 13, 2025
f54c73a
fix: version tag style changes
zlataovce Apr 13, 2025
1d77e24
fix: don't translate configuration keys+values
zlataovce Apr 13, 2025
0929766
fix: ugh Prettier
zlataovce Apr 13, 2025
ed27fed
feat: sticky project dropdown, fix main page paddings
zlataovce Apr 13, 2025
75e14b0
feat: change the homepage cards to be clickable (#564)
olijeffers0n Apr 13, 2025
fd4ce6c
feat: scroll to current page in sidebar, dropdown touch-ups
zlataovce Apr 13, 2025
834010d
feat: try out always inlining stylesheets
zlataovce Apr 13, 2025
40a8e8c
feat: try out inlining expressive-code stylesheet
zlataovce Apr 13, 2025
4961c6a
refactor: use assets CDN, preload logo
zlataovce Apr 14, 2025
f52c98c
feat: item command converter (#568)
Strokkur424 Apr 14, 2025
cd7dada
refactor: item command converter patch up
zlataovce Apr 14, 2025
0caa3e0
feat: Adventure links, bump dependencies
zlataovce Apr 15, 2025
5845058
fix: `client:only` -> `client:load`
zlataovce Apr 15, 2025
f1637f4
chore: bump dependencies
zlataovce Apr 16, 2025
7c1c339
chore: remove porting remnants, improve contributing guide
zlataovce Apr 16, 2025
1771a74
fix: reset orange for light mode
zlataovce Apr 17, 2025
7a33789
fix: scroll weirdness, make dropdown shadow less pronounced
zlataovce Apr 17, 2025
1dabe6f
fix: Safari fixes
zlataovce Apr 17, 2025
0150ae0
fix: too large images
zlataovce Apr 17, 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
  •  
  •  
  •  
Next Next commit
feat: start rewriting with Starlight
  • Loading branch information
zlataovce committed Apr 13, 2025
commit dda898c8f4496ccdfa630fb55b3892d9d078e91f
25 changes: 0 additions & 25 deletions .devcontainer/devcontainer.json

This file was deleted.

3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ indent_size = 2
max_line_length = 100
insert_final_newline = true
trim_trailing_whitespace = true

[{*.md,*.mdx}]
indent_size = 4
11 changes: 4 additions & 7 deletions .github/workflows/build-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,13 @@ jobs:
- name: "install dependencies"
run: "pnpm install"
- name: "build"
run: "pnpm run build"
env:
CI_ENV: preview
GITHUB_PR_HEAD_OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
run: "pnpm build"
- name: "copy cloudflare configuration files to build directory"
run: |
cp _headers build/
cp _redirects build/
cp _headers dist/
cp _redirects dist/
- name: "upload build artifact"
uses: "actions/upload-artifact@v4"
with:
name: "preview-build"
path: "build"
path: "dist"
2 changes: 1 addition & 1 deletion .github/workflows/deploy-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
id: "preview-build-artifact"
with:
name: "preview-build"
path: "build"
path: "dist"
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: "Deploy to Cloudflare Pages"
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ jobs:
- name: "install dependencies"
run: "pnpm install"
- name: "build"
run: "pnpm run build"
env:
CI_ENV: production
run: "pnpm build"
- name: "copy cloudflare configuration files to build directory"
run: |
cp _headers build/
cp _redirects build/
cp _headers dist/
cp _redirects dist/
- name: "publish (push)"
id: "cloudflare-publish"
uses: "AdrianGonz97/refined-cf-pages-action@v1"
Expand All @@ -42,5 +40,5 @@ jobs:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: "papermc-docs"
deploymentName: "Production"
directory: "build"
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
directory: "dist"
githubToken: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Check format
run: pnpm run format:check
run: pnpm format:check
31 changes: 22 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
/.idea
/node_modules
/build
/.vscode
/.docusaurus
.cache-loader
.DS_Store
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
.pnp.*
/.meta
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

.idea/
6 changes: 4 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pnpm-lock.yaml
docs/versioned
*.md
*.mdx
!README.md
!CONTRIBUTING.md
!CONTRIBUTING.md

# TODO: remove
old
12 changes: 11 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@
"arrowParens": "always",
"singleQuote": false,
"semi": true,
"trailingComma": "es5"
"trailingComma": "es5",
"plugins": ["prettier-plugin-astro", "prettier-plugin-organize-imports"],
"organizeImportsSkipDestructiveCodeActions": true,
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}
5 changes: 0 additions & 5 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
[files]
extend-exclude = [
"docs/versioned" # old documentation shouldn't be checked
]

[default]
locale = "en-us"

Expand Down
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
70 changes: 35 additions & 35 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,50 +106,50 @@ of a few ways:

1. `SoftwareVersion` component

This component is used to embed the current version of the software into the documentation. An example of this would be:
This component is used to embed the current version of the software into the documentation. An example of this would be:

```jsx
<SoftwareVersion versionType={"maj-min-pat"}/> // e.g. 1.19.2
<SoftwareVersion versionType={"maj-min"}/> // e.g. 1.19
<SoftwareVersion versionType={"maj"}/> // e.g. 1
```jsx
<SoftwareVersion versionType={"maj-min-pat"}/> // e.g. 1.19.2
<SoftwareVersion versionType={"maj-min"}/> // e.g. 1.19
<SoftwareVersion versionType={"maj"}/> // e.g. 1

// You can set the project name to be used for the versioning (defaults to paper):
<SoftwareVersion versionType={"maj-min-pat"} project={"velocity"}/> // e.g. 3.3.0-SNAPSHOT
```
// You can set the project name to be used for the versioning (defaults to paper):
<SoftwareVersion versionType={"maj-min-pat"} project={"velocity"}/> // e.g. 3.3.0-SNAPSHOT
```

2. `Javadoc` component

This component is used to embed a link to the current version of the corresponding Javadoc. An example of this would be:
This component is used to embed a link to the current version of the corresponding Javadoc. An example of this would be:

```jsx
<Javadoc name={"org.bukkit.event.Event"}>here</Javadoc>
// The project can also be set here, and defaults to Paper
```
```jsx
<Javadoc name={"org.bukkit.event.Event"}>here</Javadoc>
// The project can also be set here, and defaults to Paper
```

3. `VersionFormattedCode` component

This component is used to embed a code block with the current version of the software. An example of this would be:

````jsx
<VersionFormattedCode language={"yaml"}>
```⠀
name: Paper-Test-Plugin
version: '1.0'
main: io.papermc.testplugin.TestPlugin
description: Paper Test Plugin
api-version: '%%_MAJ_MIN_PAT_MC_%%'
bootstrapper: io.papermc.testplugin.TestPluginBootstrap
loader: io.papermc.testplugin.TestPluginLoader
```⠀
</VersionFormattedCode>

// The possible placeholders are:
%%_MAJ_MIN_MC_%% - Major-Minor Paper Version (E.g. 1.20)
%%_MAJ_MIN_PAT_MC_%% - Major-Minor-Patch Paper Version (E.g. 1.20.4)
%%_MAJ_MIN_VEL_%% - Major Velocity Version (E.g. 3.1.0)
%%_MAJ_MIN_PAT_VEL_%% - Major-Minor-Patch Velocity Version (E.g. 3.1.1-SNAPSHOT)
%%_MAJ_MIN_PAT_USERDEV_%% - Latest Paperweight-Userdev Version (E.g. 1.7.3)
````
This component is used to embed a code block with the current version of the software. An example of this would be:

````jsx
<VersionFormattedCode language={"yaml"}>
```⠀
name: Paper-Test-Plugin
version: '1.0'
main: io.papermc.testplugin.TestPlugin
description: Paper Test Plugin
api-version: '%%_MAJ_MIN_PAT_MC_%%'
bootstrapper: io.papermc.testplugin.TestPluginBootstrap
loader: io.papermc.testplugin.TestPluginLoader
```⠀
</VersionFormattedCode>

// The possible placeholders are:
%%_MAJ_MIN_MC_%% - Major-Minor Paper Version (E.g. 1.20)
%%_MAJ_MIN_PAT_MC_%% - Major-Minor-Patch Paper Version (E.g. 1.20.4)
%%_MAJ_MIN_VEL_%% - Major Velocity Version (E.g. 3.1.0)
%%_MAJ_MIN_PAT_VEL_%% - Major-Minor-Patch Velocity Version (E.g. 3.1.1-SNAPSHOT)
%%_MAJ_MIN_PAT_USERDEV_%% - Latest Paperweight-Userdev Version (E.g. 1.7.3)
````

When the major version of the software changes, the docs will still need to have a "snapshot" created to keep documentation
for older versions. This is done by using Docusaurus's `version` command:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ How to get docs running on your local machine for development.

### Prerequisites

- [node](https://nodejs.org)
- [pnpm](https://pnpm.io/installation)
- [node](https://nodejs.org)
- [pnpm](https://pnpm.io/installation)

### Local Development

Expand Down
72 changes: 72 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";
// import starlightLinksValidator from "starlight-links-validator";
import starlightSidebarTopics from "starlight-sidebar-topics";

const prod = process.env.NODE_ENV === "production";

// https://astro.build/config
export default defineConfig({
site: prod ? "https://docs.papermc.io" : undefined,
integrations: [
starlight({
title: "PaperMC Docs",
favicon: "favicon.ico",
logo: {
light: "./src/assets/logo-marker-light.svg",
dark: "./src/assets/logo-marker-dark.svg",
replacesTitle: true,
},
social: [
{ icon: "github", label: "GitHub", href: "https://github.com/PaperMC" },
{ icon: "discord", label: "Discord", href: "https://discord.gg/PaperMC" },
],
lastUpdated: true,
editLink: {
baseUrl: "https://github.com/PaperMC/docs/edit/main/",
},
customCss: [
"@fontsource/poppins/400.css",
// "@fontsource/poppins/600.css", // see src/styles/custom.css
"@fontsource/jetbrains-mono/400.css",
"@fontsource/jetbrains-mono/600.css",
"./src/styles/custom.css",
],
components: {
Head: "./src/components/overrides/Head.astro",
Sidebar: "./src/components/overrides/Sidebar.astro",
},
plugins: [
// starlightLinksValidator(),
starlightSidebarTopics(
[
{
id: "paper",
label: "Paper",
link: "/paper/",
items: [
{
label: "Administration",
items: [
{
label: "Getting started",
autogenerate: { directory: "paper/admin/getting-started" },
},
{ label: "How-to guides", autogenerate: { directory: "paper/admin/how-to" } },
{ label: "Miscellaneous", autogenerate: { directory: "paper/admin/misc" } },
],
},
],
},
],
{
// pages excluded from sidebars
topics: {
paper: ["/paper/admin"],
},
}
),
],
}),
],
});
30 changes: 0 additions & 30 deletions docs/paper/README.mdx

This file was deleted.

15 changes: 0 additions & 15 deletions docs/paper/admin/README.mdx

This file was deleted.

Loading