Skip to content

Commit

Permalink
format everything
Browse files Browse the repository at this point in the history
  • Loading branch information
its-miroma committed Feb 11, 2025
1 parent 285d507 commit d1efd14
Show file tree
Hide file tree
Showing 792 changed files with 1,176 additions and 7,577 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
config: .markdownlint-cli2.yaml
globs: |
**/*.md
!README.md
!**/node_modules
!**/.git
!**/node_modules
!README.md
!translated/**
!versions/**
4 changes: 3 additions & 1 deletion .vitepress/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ function generateTranslatedThemeConfig(localeCode: string): Fabric.ThemeConfig {
footer: {
copyright: websiteResolver("footer.copyright").replace(
"%s",
`<a href=\"https://github.com/FabricMC/fabric-docs/blob/main/LICENSE\" target=\"_blank\" rel=\"noreferrer\">${websiteResolver("footer.license")}</a>`
`<a href=\"https://github.com/FabricMC/fabric-docs/blob/main/LICENSE\" target=\"_blank\" rel=\"noreferrer\">${websiteResolver(
"footer.license"
)}</a>`
),
message: websiteResolver("footer.message"),
},
Expand Down
72 changes: 36 additions & 36 deletions .vitepress/sidebars/develop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default [
},
{
text: "develop.items.custom-enchantment-effects",
link: "/develop/items/custom-enchantment-effects"
link: "/develop/items/custom-enchantment-effects",
},
{
text: "develop.items.custom-data-components",
Expand Down Expand Up @@ -113,9 +113,9 @@ export default [
{
text: "develop.blocks.block-entity-renderer",
link: "/develop/blocks/block-entity-renderer",
}
]
}
},
],
},
],
},
{
Expand Down Expand Up @@ -209,38 +209,38 @@ export default [
],
},
{
text: "develop.dataGeneration",
collapsed: true,
items: [
{
text: "develop.dataGeneration.setup",
link: "/develop/data-generation/setup"
},
{
text: "develop.dataGeneration.tags",
link: "/develop/data-generation/tags"
},
{
text: "develop.dataGeneration.translations",
link: "/develop/data-generation/translations"
},
{
text: "develop.dataGeneration.advancements",
link: "/develop/data-generation/advancements"
},
{
text: "develop.dataGeneration.recipes",
link: "/develop/data-generation/recipes"
},
{
text: "develop.dataGeneration.lootTables",
link: "/develop/data-generation/loot-tables"
},
{
text: "develop.dataGeneration.blockModels",
link: "/develop/data-generation/block-models"
}
]
text: "develop.dataGeneration",
collapsed: true,
items: [
{
text: "develop.dataGeneration.setup",
link: "/develop/data-generation/setup",
},
{
text: "develop.dataGeneration.tags",
link: "/develop/data-generation/tags",
},
{
text: "develop.dataGeneration.translations",
link: "/develop/data-generation/translations",
},
{
text: "develop.dataGeneration.advancements",
link: "/develop/data-generation/advancements",
},
{
text: "develop.dataGeneration.recipes",
link: "/develop/data-generation/recipes",
},
{
text: "develop.dataGeneration.lootTables",
link: "/develop/data-generation/loot-tables",
},
{
text: "develop.dataGeneration.blockModels",
link: "/develop/data-generation/block-models",
},
],
},
{
text: "develop.misc",
Expand Down
4 changes: 2 additions & 2 deletions .vitepress/sidebars/versioned/1.20.4.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@
},
{
"text": "Yarn GitHub",
"processSidebarURLs": false,
"processSidebarURLs": false,
"translatable": false,
"link": "https://github.com/FabricMC/yarn"
},
{
"text": "Loom GitHub",
"processSidebarURLs": false,
"processSidebarURLs": false,
"translatable": false,
"link": "https://github.com/FabricMC/fabric-loom"
}
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/sidebars/versioned/1.21.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,4 @@
]
}
]
}
}
2 changes: 1 addition & 1 deletion .vitepress/theme/components/VersionReminder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ p.version {
gap: 8px;
}
}
</style>
</style>
19 changes: 14 additions & 5 deletions .vitepress/theme/components/VersionSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,16 @@ function buildRoutePath(
// e.g. /en/ -> /en/1.2.0/ or /en/1.2.0/ -> /en/1.3.0/
if (!isOnLatest) {
if (version === props.versioningPlugin.latestVersion) {
return currentPath.replace(`/${locale}/${currentVersion.value}/`, `/${locale}/`);
return currentPath.replace(
`/${locale}/${currentVersion.value}/`,
`/${locale}/`
);
} else {
// Replace any existing version segment with the new one
return currentPath.replace(`/${locale}/${currentVersion.value}/`, `/${locale}/${version}/`);
return currentPath.replace(
`/${locale}/${currentVersion.value}/`,
`/${locale}/${version}/`
);
}
} else {
// If currently on latest, just add the new version segment
Expand All @@ -95,12 +101,15 @@ function buildRoutePath(
// Navigate to the selected version
function visitVersion(version: string) {
const localeKeys = Object.keys(data.site.value.locales);
const isLocalized = localeKeys.some((key) => router.route.path.startsWith(`/${key}/`));
const isLocalized = localeKeys.some((key) =>
router.route.path.startsWith(`/${key}/`)
);
const locale = isLocalized
? localeKeys.find((key) => router.route.path.startsWith(`/${key}/`)) || null
: null;
const isOnLatest = currentVersion.value === props.versioningPlugin.latestVersion;
const isOnLatest =
currentVersion.value === props.versioningPlugin.latestVersion;
const route = buildRoutePath(router.route.path, locale, version, isOnLatest);
router.go(route);
Expand Down Expand Up @@ -257,4 +266,4 @@ function visitVersion(version: string) {
.group + .item {
padding-top: 4px;
}
</style>
</style>
32 changes: 17 additions & 15 deletions .vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
font-family: "Flag Emoji Polyfill";
unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
src: url("./CountryFlagsPolyfill.woff2") format('woff2');
src: url("./CountryFlagsPolyfill.woff2") format("woff2");
font-display: swap;
}

Expand All @@ -24,23 +24,25 @@
--vp-c-brand-3: var(--vp-c-blue-1);
--vp-c-brand-soft: var(--vp-c-blue-soft);


/* Override Hero Text Gradient */
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg,
#3463fe 30%,
#4787ff);
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#3463fe 30%,
#4787ff
);

/* Flag Emoji Polyfill (Chrome does not render county flags on windows) */
--vp-font-family-base: 'Flag Emoji Polyfill', 'Inter', ui-sans-serif, system-ui, sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
--vp-font-family-base: "Flag Emoji Polyfill", "Inter", ui-sans-serif,
system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
}

:root:where(:lang(zh)) {
/* Flag Emoji Polyfill (Chrome does not render county flags on windows) */
--vp-font-family-base: 'Flag Emoji Polyfill', 'Punctuation SC', 'Inter', ui-sans-serif, system-ui,
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
--vp-font-family-base: "Flag Emoji Polyfill", "Punctuation SC", "Inter",
ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
}

/* Sidebar Scrollbar - Styles scrollbars within the side navigation pane for improved visibility. */
Expand Down Expand Up @@ -90,12 +92,12 @@
}

/* Local Search Box Animations - Fade in backdrop and animate search box on appearance. */
.VPLocalSearchBox>.backdrop {
.VPLocalSearchBox > .backdrop {
opacity: 0;
animation: show 200ms 100ms cubic-bezier(0.38, 0.97, 0.56, 0.76) forwards;
}

.VPLocalSearchBox>.shell {
.VPLocalSearchBox > .shell {
animation: show 400ms 100ms cubic-bezier(0.38, 0.97, 0.56, 0.76) forwards;
opacity: 0;
transform: rotateX(-90deg);
Expand Down Expand Up @@ -137,8 +139,8 @@ kbd:not(.DocSearch-Button-Key) {
}

/* Center images within paragraphs. */
.vp-doc>p>img,
.vp-doc>div>p>img {
.vp-doc > p > img,
.vp-doc > div > p > img {
margin-left: auto;
margin-right: auto;
}
Expand All @@ -154,4 +156,4 @@ h1.vp-doc {
/* Custom Icons */
.vpi-versioning {
--icon: url("data:image/svg+xml;charset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U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMi4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjwvcGF0aD48cGF0aCBkPSJNMTcgN1Y4QzE3IDEwLjUgMTUgMTEgMTUgMTFMOSAxM0M5IDEzIDcgMTMuNSA3IDE2VjE3IiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMi4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9yZS1saW5lam9pbj0icm91bmQiPjwvcGF0aD48L3N2Zz4=");
}
}
14 changes: 11 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
{
"explorer.autoRevealExclude": {
"versions/**": true
},
"explorer.excludeGitIgnore": true,
"files.exclude": {
"translated/**": true,
"versions/**": true
},
"markdownlint.lintWorkspaceGlobs": [
"**/*.md",
"!**/node_modules",
"!versions/**",
"!node_modules/**",
"!README.md",
"!translated/**",
"!README.md"
"!versions/**"
]
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ This repository contains the source code for the Fabric Documentation website, w

## Contributing

<!-- markdownlint-disable-next-line search-replace -->
Please refer to the [contribution guidelines](./contributing.md) for more information.

If you wish to contribute translations, you can do so via the [Crowdin project](https://crowdin.com/project/fabricmc).
Expand Down
10 changes: 2 additions & 8 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: Contribution Guidelines
description: Guidelines for contributions to the Fabric Documentation.
---

# Contribution Guidelines {#contributing}

This website uses [VitePress](https://vitepress.dev/) to generate static HTML from various Markdown files. You should familiarize yourself with the Markdown extensions that VitePress supports [here](https://vitepress.dev/guide/markdown#features).

There are three ways you can contribute to this website:
Expand Down Expand Up @@ -155,25 +153,21 @@ Each page must have a `title` and a `description` in the frontmatter.

Remember to also add your GitHub username to `authors` in the frontmatter of the Markdown file! This way we can give you proper credit.

```md
```yaml
---
title: Title of the Page
description: This is the description of the page.
authors:
- your-username
---

# Title of the Page {#title-of-the-page}

...
```

### Add Anchors to Headings {#add-anchors-to-headings}

Each heading must have an anchor, which is used to link to that heading:

```md
# This Is a Heading {#this-is-a-heading}
## This Is a Heading {#this-is-a-heading}
```

The anchor must use lowercase characters, numbers and dashes.
Expand Down
24 changes: 11 additions & 13 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,20 @@ files:
- README.md
translation: /translated/%locale_with_underscore%/%original_path%/%original_file_name%
excluded_target_languages:
- es-CL # Spanish, Chile
- fr-CA # French, Canada
- es-VE # Spanish, Venezuela
- es-UY # Spanish, Uruguay
- es-EC # Spanish, Ecuador
- es-AR # Spanish, Argentina
- es-MX # Spanish, Mexico
- es-AR
- es-CL
- es-EC
- es-MX
- es-UY
- es-VE
- fr-CA
- source: /*_translations.json
ignore:
- /translated/**/*
translation: /translated/%locale_with_underscore%/%original_path%/%original_file_name%
excluded_target_languages:
- es-AR
- es-CL
- fr-CA
- es-VE
- es-UY
- es-EC
- es-AR
- es-MX
- es-UY
- es-VE
- fr-CA
2 changes: 0 additions & 2 deletions develop/automatic-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ authors:
- kevinthegreat1
---

# Automated Testing {#automated-testing}

This page explains how to write code to automatically test parts of your mod. There are two ways to automatically test your mod: unit tests with Fabric Loader JUnit or game tests with the Gametest framework from Minecraft.

Unit tests should be used to test components of your code, such as methods and helper classes, while game tests spin up an actual Minecraft client and server to run your tests, which makes it suitable for testing features and gameplay.
Expand Down
2 changes: 0 additions & 2 deletions develop/blocks/block-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ authors:
- natri0
---

# Block Entities {#block-entities}

Block entities are a way to store additional data for a block, that is not part of the block state: inventory contents, custom name and so on.
Minecraft uses block entities for blocks like chests, furnaces, and command blocks.

Expand Down
2 changes: 0 additions & 2 deletions develop/blocks/block-entity-renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ authors:
- natri0
---

# Block Entity Renderers {#block-entity-renderers}

Sometimes, using Minecraft's model format is not enough. If you need to add dynamic rendering to your block's visuals, you will need to use a `BlockEntityRenderer`.

For example, let's make the Counter Block from the [Block Entities article](../blocks/block-entities) show the number of clicks on its top side.
Expand Down
Loading

0 comments on commit d1efd14

Please sign in to comment.