New docs site (#2521)
* initial docs * more docs work * Update readme + add license * update frontend GH action
This commit is contained in:
parent
356a06e694
commit
486cd68bf7
8
.github/workflows/frontend-pages.yml
vendored
8
.github/workflows/frontend-pages.yml
vendored
@ -1,6 +1,9 @@
|
||||
name: Deploy frontend
|
||||
name: Clear pages cache
|
||||
|
||||
on: push
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- prod
|
||||
|
||||
jobs:
|
||||
wait:
|
||||
@ -16,7 +19,6 @@ jobs:
|
||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||
accountId: '9ddae624c98677d68d93df6e524a6061'
|
||||
project: 'frontend'
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
commitHash: ${{ steps.push-changes.outputs.commit-hash }}
|
||||
- name: Purge cache
|
||||
if: github.ref == 'refs/heads/prod'
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -55,3 +55,5 @@ generated
|
||||
|
||||
# app testing dir
|
||||
app-playground-data/*
|
||||
|
||||
.astro
|
||||
|
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -5603,7 +5603,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "theseus"
|
||||
version = "0.8.8"
|
||||
version = "0.8.9"
|
||||
dependencies = [
|
||||
"async-recursion",
|
||||
"async-tungstenite",
|
||||
@ -5654,7 +5654,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "theseus_gui"
|
||||
version = "0.8.8"
|
||||
version = "0.8.9"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"cocoa 0.25.0",
|
||||
|
21
apps/docs/.gitignore
vendored
Normal file
21
apps/docs/.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
4
apps/docs/.vscode/extensions.json
vendored
Normal file
4
apps/docs/.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"recommendations": ["astro-build.astro-vscode"],
|
||||
"unwantedRecommendations": []
|
||||
}
|
11
apps/docs/.vscode/launch.json
vendored
Normal file
11
apps/docs/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "./node_modules/.bin/astro dev",
|
||||
"name": "Development server",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
34
apps/docs/LICENSE
Normal file
34
apps/docs/LICENSE
Normal file
@ -0,0 +1,34 @@
|
||||
Creative Commons Legal Code
|
||||
CC0 1.0 Universal
|
||||
Official translations of this legal tool are available
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
|
||||
|
||||
the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
|
||||
moral rights retained by the original author(s) and/or performer(s);
|
||||
publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
|
||||
rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
|
||||
rights protecting the extraction, dissemination, use and reuse of data in a Work;
|
||||
database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
|
||||
other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
|
||||
Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
|
||||
Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
|
||||
Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
|
23
apps/docs/README.md
Normal file
23
apps/docs/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Modrinth Documentation
|
||||
|
||||
Welcome to the Modrinth documentation!
|
||||
|
||||
## Development
|
||||
|
||||
### Pre-requisites
|
||||
|
||||
Before you begin, ensure you have the following installed on your machine:
|
||||
|
||||
- [Node.js](https://nodejs.org/en/)
|
||||
- [pnpm](https://pnpm.io/)
|
||||
|
||||
### Setup
|
||||
|
||||
Follow these steps to set up your development environment:
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm docs:dev
|
||||
```
|
||||
|
||||
You should now have a development build of the documentation site running with hot-reloading enabled. Any changes you make to the code will automatically refresh the browser.
|
51
apps/docs/astro.config.mjs
Normal file
51
apps/docs/astro.config.mjs
Normal file
@ -0,0 +1,51 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
import starlight from '@astrojs/starlight';
|
||||
import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: 'https://docs.modrinth.com',
|
||||
integrations: [
|
||||
starlight({
|
||||
title: 'Modrinth Documentation',
|
||||
editLink: {
|
||||
baseUrl: 'https://github.com/modrinth/code/edit/main/apps/docs/',
|
||||
},
|
||||
social: {
|
||||
github: 'https://github.com/modrinth/code',
|
||||
discord: 'https://discord.modrinth.com',
|
||||
'x.com': 'https://x.com/modrinth',
|
||||
mastodon: 'https://floss.social/@modrinth',
|
||||
threads: 'https://threads.net/@modrinth',
|
||||
},
|
||||
logo: {
|
||||
light: './src/assets/light-logo.svg',
|
||||
dark: './src/assets/dark-logo.svg',
|
||||
replacesTitle: true,
|
||||
},
|
||||
customCss: [
|
||||
'@modrinth/assets/styles/variables.scss',
|
||||
'@modrinth/assets/styles/inter.scss',
|
||||
'./src/styles/modrinth.css',
|
||||
],
|
||||
plugins: [
|
||||
// Generate the OpenAPI documentation pages.
|
||||
starlightOpenAPI([
|
||||
{
|
||||
base: 'api',
|
||||
label: 'Modrinth API',
|
||||
schema: './public/openapi.yaml',
|
||||
},
|
||||
])
|
||||
],
|
||||
sidebar: [
|
||||
{
|
||||
label: 'Contributing to Modrinth',
|
||||
autogenerate: { directory: 'contributing' },
|
||||
},
|
||||
// Add the generated sidebar group to the sidebar.
|
||||
...openAPISidebarGroups,
|
||||
],
|
||||
}),
|
||||
],
|
||||
});
|
21
apps/docs/package.json
Normal file
21
apps/docs/package.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "@modrinth/docs",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"start": "astro dev",
|
||||
"build": "astro check && astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"@astrojs/starlight": "^0.26.3",
|
||||
"@modrinth/assets": "workspace:*",
|
||||
"astro": "^4.10.2",
|
||||
"sharp": "^0.32.5",
|
||||
"starlight-openapi": "^0.7.0",
|
||||
"typescript": "^5.5.4"
|
||||
}
|
||||
}
|
BIN
apps/docs/public/favicon.ico
Normal file
BIN
apps/docs/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
3882
apps/docs/public/openapi.yaml
Normal file
3882
apps/docs/public/openapi.yaml
Normal file
File diff suppressed because it is too large
Load Diff
79
apps/docs/public/welcome-channel.yaml
Normal file
79
apps/docs/public/welcome-channel.yaml
Normal file
@ -0,0 +1,79 @@
|
||||
- type: text
|
||||
text: https://cdn.discordapp.com/attachments/734084240408444949/975414177550200902/welcome-channel.png
|
||||
|
||||
- type: embed
|
||||
embeds:
|
||||
- title: __Welcome to Modrinth's Discord server!__
|
||||
url: https://modrinth.com
|
||||
color: 0x1bd96a
|
||||
description: "Modrinth is the place for Minecraft mods, plugins, data packs, shaders, resource packs, and
|
||||
modpacks. Discover, play, and share Minecraft content through our open-source platform built for the community."
|
||||
|
||||
- type: embed
|
||||
embeds:
|
||||
- title: "**:scroll: __Rules__**"
|
||||
color: 0x4f9cff
|
||||
description: "Modrinth's rules are easy to follow. Despite this, please keep in mind that this is not an entirely
|
||||
open forum. First and foremost, this Discord server is intended to facilitate the development of Modrinth and
|
||||
for communication regarding Modrinth. Ultimately, it is up to the discretion of the moderators whether your
|
||||
messages are in violation of our rules.\n\n
|
||||
Modrinth's rules are split up into two categories: the **__DOs__** and the **__DO NOTs__**."
|
||||
- title: ":white_check_mark: Do:"
|
||||
color: 0x1bd96a
|
||||
description: >-
|
||||
1. Treat every user with respect and consider the opinions and viewpoints of others
|
||||
|
||||
2. Stay on-topic in all channels; all channels are only for discussion of **Modrinth itself** with the
|
||||
exceptions of <#783091855616901200>, <#1109517383074328686>, and <#1061855024252207167>
|
||||
|
||||
3. Follow Discord's rules, including the [Community Guidelines](https://discord.com/guidelines) and the [Terms
|
||||
of Service](https://discord.com/terms) (this also means that discussions regarding "cracked" launchers and
|
||||
Discord client modifications are **prohibited under all circumstances**)
|
||||
|
||||
4. Contact the moderators at any time via the <@&895382919772766219> ping
|
||||
|
||||
5. Respect the use of accessibility and self-identity tools such as [PluralKit](https://pluralkit.me)
|
||||
- title: ":no_entry: Do not:"
|
||||
color: 0xff496e
|
||||
description: >-
|
||||
6. Harass, bother, provoke, or insult anyone, including by sending unsolicited DMs or friend requests
|
||||
|
||||
7. Cause problems or impede Modrinth's development
|
||||
|
||||
8. Discuss drama from other places, including bashing or hating on other websites and platforms (though
|
||||
constructive criticism for the betterment of Modrinth is encouraged)
|
||||
|
||||
9. Report Modrinth content in the Discord (use the Report button on the website)
|
||||
|
||||
10. Assume staff member's opinions reflect those of Modrinth
|
||||
- title: ":pencil2: Nickname policy:"
|
||||
color: 0xffa347
|
||||
description: >-
|
||||
We want to keep this server clean and therefore require that display names of all members on the server are
|
||||
readable, accessible, and free of attention-seeking elements, which includes, but is not limited to, display
|
||||
names that begin with hoisting characters, have an excessive number of emojis in them, or use "fancy fonts",
|
||||
"glitch effects" and any other Unicode characters, which are either very inaccessible to screen readers or cause
|
||||
annoyance to other members.
|
||||
|
||||
When we find that your display name does not adhere to this policy, we will try to correct it by changing your
|
||||
nickname on the server. Repetitive attempts to revert to a violating display name may result in your removal
|
||||
from the server. We will also permanently remove any users whose profiles contain inappropriate content.
|
||||
- type: links
|
||||
color: 0x4f9cff
|
||||
title: "**:link: __Links__**"
|
||||
links:
|
||||
Website: https://modrinth.com
|
||||
Support: https://support.modrinth.com
|
||||
Status page: https://status.modrinth.com
|
||||
Roadmap: https://roadmap.modrinth.com
|
||||
Blog and newsletter: https://blog.modrinth.com/subscribe?utm_medium=social&utm_source=discord&utm_campaign=welcome
|
||||
API documentation: https://docs.modrinth.com
|
||||
Modrinth source code: https://github.com/modrinth
|
||||
Help translate Modrinth: https://crowdin.com/project/modrinth
|
||||
Follow Modrinth on Mastodon: https://floss.social/@modrinth
|
||||
Follow Modrinth on Twitter: https://twitter.com/modrinth
|
||||
|
||||
- type: text
|
||||
text: |
|
||||
**Main server:** <https://discord.modrinth.com>
|
||||
**Testing server:** <https://discord.modrinth.com/labs>
|
21
apps/docs/src/assets/dark-logo.svg
Normal file
21
apps/docs/src/assets/dark-logo.svg
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1558 207.2">
|
||||
<!-- Generator: Adobe Illustrator 28.6.0, SVG Export Plug-In . SVG Version: 1.2.0 Build 709) -->
|
||||
<g>
|
||||
<g id="Layer_1">
|
||||
<g id="icon" fill="#1bd96a">
|
||||
<path d="M146.1,109.8l-14.4,17.6-24.1,7.6-10.8-12-61.9,37.1c-2.9-3.8-6.4-9.1-8.5-14.3l61.7-37-5.6-14.9,17.6-18.1,22.3-4.8,6.4,7.9-10.3,10.4-8.9,2.8-6.4,6.6,3.1,8.7,6.4,6.8,9-2.4,6.4-7,13.9-4.4s4.1,9.3,4.1,9.3Z" fill-rule="evenodd"/>
|
||||
<path d="M208.6,86.6l-48.9,13.2c-.8-4.7-1.6-8.9-4.3-16.1l49-13.2c2.1,5.5,3.5,10.9,4.2,16.1Z" fill-rule="evenodd"/>
|
||||
<path d="M33.7,110.5c3.5,41,37.9,73.2,79.7,73.2s59-18.4,72-45.1l15.9,5.5c-15.3,33.2-48.9,56.3-87.9,56.3S20.3,160.7,16.8,110.5c0,0,16.8,0,16.8,0ZM17.1,93.8C22,45,63.3,6.8,113.4,6.8s96.8,43.4,96.8,96.8-1.1,16.9-3.2,24.8l-15.9-5.5c1.6-6.3,2.4-12.8,2.3-19.3,0-44.2-35.9-80-80-80S38.8,54.3,34,93.8h-16.9,0Z" fill-rule="evenodd"/>
|
||||
<path d="M113.1,57c-25.7,0-46.6,20.9-46.6,46.7s20.9,46.7,46.7,46.7,2.6,0,3.9-.2l4.7,16.3c-2.8.4-5.7.6-8.5.6-35,0-63.4-28.4-63.4-63.4s28.4-63.4,63.4-63.4,1.7,0,2.6,0c0,0-2.6,16.7-2.6,16.7ZM132.2,43.2c25.7,8.1,44.4,32.1,44.4,60.5s-16,48.8-38.7,58.4l-4.6-16.2c15.8-7.5,26.7-23.6,26.7-42.2s-12.6-37.1-30.3-43.7l2.7-16.8h0Z" fill-rule="evenodd"/>
|
||||
</g>
|
||||
<path id="modrinth" fill="#fff" d="M362,74.2c11.7,0,21.1,3.3,27.9,10.1,6.8,7,10.3,17.1,10.3,30.6v53.3h-21.8v-50.5c0-8.2-1.7-14.3-5.4-18.4-3.6-4-8.7-6.1-15.5-6.1s-13.2,2.4-17.6,7.1c-4.4,4.9-6.6,11.8-6.6,20.7v47.2h-21.8v-50.5c0-8.2-1.7-14.3-5.4-18.4-3.6-4-8.7-6.1-15.5-6.1s-13.2,2.4-17.6,7.1c-4.4,4.7-6.6,11.7-6.6,20.7v47.2h-21.8v-93h20.7v11.8c3.5-4.2,7.8-7.3,13.1-9.6,5.2-2.3,11-3.3,17.4-3.3s13.2,1.2,18.6,3.8c5.4,2.8,9.6,6.6,12.7,11.7,3.8-4.9,8.7-8.7,14.8-11.5,6.1-2.6,12.7-4,20-4h0ZM470.1,169.4c-9.4,0-17.9-2.1-25.4-6.1-7.4-3.9-13.5-9.8-17.6-17.1-4.4-7.1-6.4-15.3-6.4-24.6s2.1-17.4,6.4-24.5c4.2-7.2,10.3-13,17.6-16.9,7.5-4,16-6.1,25.4-6.1s18.1,2.1,25.6,6.1c7.5,4,13.4,9.8,17.8,16.9,4.2,7.1,6.3,15.3,6.3,24.5s-2.1,17.4-6.3,24.6c-4.4,7.3-10.3,13.1-17.8,17.1-7.5,4-16,6.1-25.6,6.1h0ZM470.1,150.8c8,0,14.6-2.6,19.9-8s7.8-12.4,7.8-21.1-2.6-15.7-7.8-21.1-11.8-8-19.9-8-14.6,2.6-19.7,8c-5.2,5.4-7.8,12.4-7.8,21.1s2.6,15.7,7.8,21.1c5,5.4,11.7,8,19.7,8ZM631.2,39v129.2h-20.9v-12c-3.6,4.3-8.1,7.7-13.2,9.9-5.4,2.3-11.1,3.3-17.6,3.3s-16.9-1.9-24-5.9-12.9-9.6-16.9-16.9c-4-7.1-6.1-15.5-6.1-24.9s2.1-17.8,6.1-24.9c4-7.1,9.8-12.7,16.9-16.7s15.1-5.9,24-5.9,11.8,1.1,16.9,3.1c5,2.1,9.5,5.3,13.1,9.4v-47.7h21.8,0ZM582.1,150.8c5.2,0,9.9-1.2,14.1-3.7,4.2-2.3,7.5-5.7,9.9-10.1,2.4-4.4,3.7-9.6,3.7-15.3s-1.2-11-3.7-15.3c-2.4-4.3-5.8-7.8-9.9-10.3-4.2-2.3-8.9-3.5-14.1-3.5s-9.9,1.2-14.1,3.5c-4.2,2.4-7.5,5.9-9.9,10.3-2.4,4.3-3.7,9.6-3.7,15.3s1.2,11,3.7,15.3c2.4,4.4,5.8,7.8,9.9,10.1,4.2,2.4,8.9,3.7,14.1,3.7ZM679.9,88.8c6.3-9.8,17.2-14.6,33.1-14.6v20.7c-1.7-.3-3.3-.5-5-.5-8.5,0-15.2,2.4-19.8,7.3-4.7,5.1-7.1,12.2-7.1,21.4v45.1h-21.8v-93h20.7v13.6h0ZM730.9,75.2h21.8v93h-21.8s0-93,0-93ZM741.9,59.9c-4,0-7.3-1.2-9.9-3.8-2.6-2.4-4-5.7-4-9.2,0-3.7,1.4-6.8,4-9.4,2.6-2.4,5.9-3.7,9.9-3.7s7.3,1.2,9.9,3.5c2.6,2.4,4,5.4,4,9s-1.2,7-3.8,9.6c-2.6,2.6-6.1,4-10.1,4ZM833.5,74.2c11.7,0,21.1,3.5,28.2,10.3s10.6,17.1,10.6,30.5v53.3h-21.8v-50.5c0-8.2-1.9-14.3-5.7-18.4-3.8-4-9.2-6.1-16.4-6.1s-14.3,2.4-19,7.1c-4.7,4.9-7,11.8-7,20.9v47h-21.8v-93h20.7v12c3.7-4.3,8.2-7.5,13.6-9.8s11.7-3.3,18.5-3.3h0ZM955.3,163.2c-2.7,2.2-5.9,3.8-9.2,4.7-3.8,1.1-7.7,1.6-11.7,1.6-10.3,0-18.1-2.6-23.7-8-5.6-5.4-8.4-13.1-8.4-23.3v-44.8h-15.3v-17.4h15.3v-21.2h21.8v21.2h24.9v17.4h-24.9v44.2c0,4.5,1,8,3.3,10.3,2.3,2.4,5.4,3.6,9.6,3.6s8.9-1.2,12.2-3.8l6.1,15.5h0ZM1025.5,74.2c11.7,0,21.1,3.5,28.2,10.3s10.6,17.1,10.6,30.5v53.3h-21.8v-50.5c0-8.2-1.9-14.3-5.8-18.4-3.8-4-9.2-6.1-16.4-6.1s-14.3,2.4-19,7.1c-4.7,4.9-7,11.8-7,20.9v47h-21.8V39h21.8v47c3.7-3.8,8-6.8,13.4-8.9,5.2-1.9,11.1-3,17.6-3h0Z"/>
|
||||
<g id="docs" fill="#1bd96a">
|
||||
<path d="M1177.8,169.7c-8.9,0-16.9-2-24-6-7.1-4-12.7-9.5-16.7-16.6-4-7.1-6.1-15.4-6.1-25s2-17.9,6.1-25c4-7.1,9.6-12.6,16.7-16.5,7.1-3.9,15.1-5.9,24-5.9s14.7,1.7,20.8,5.1c6.1,3.4,11,8.6,14.6,15.5,3.6,6.9,5.4,15.9,5.4,26.7s-1.7,19.6-5.2,26.6c-3.5,7-8.3,12.2-14.4,15.7-6.1,3.5-13.2,5.2-21.2,5.2ZM1180.4,151.2c5.2,0,9.9-1.2,14-3.5,4.1-2.3,7.4-5.7,9.9-10.1,2.5-4.4,3.7-9.5,3.7-15.4s-1.2-11.2-3.7-15.5c-2.5-4.3-5.8-7.7-9.9-10-4.1-2.3-8.8-3.5-14-3.5s-9.9,1.2-14,3.5c-4.1,2.3-7.4,5.6-9.9,10-2.5,4.3-3.7,9.5-3.7,15.5s1.2,11,3.7,15.4c2.5,4.4,5.8,7.8,9.9,10.1,4.1,2.3,8.8,3.5,14,3.5ZM1208.6,168.5v-21.9l.9-24.6-1.7-24.6v-57.6h21.5v128.8h-20.7Z"/>
|
||||
<path d="M1299.5,169.7c-9.5,0-17.9-2.1-25.3-6.2-7.4-4.1-13.2-9.7-17.5-16.9-4.3-7.2-6.4-15.3-6.4-24.5s2.1-17.4,6.4-24.6c4.3-7.1,10.1-12.7,17.5-16.7,7.4-4,15.8-6.1,25.3-6.1s18.1,2,25.6,6.1c7.5,4.1,13.3,9.6,17.5,16.7,4.2,7.1,6.3,15.3,6.3,24.6s-2.1,17.3-6.3,24.5c-4.2,7.2-10.1,12.8-17.5,16.9-7.5,4.1-16,6.2-25.6,6.2ZM1299.5,151.2c5.3,0,10.1-1.2,14.2-3.5,4.2-2.3,7.4-5.7,9.8-10.1,2.4-4.4,3.6-9.5,3.6-15.4s-1.2-11.2-3.6-15.5c-2.4-4.3-5.6-7.7-9.8-10-4.2-2.3-8.8-3.5-14.1-3.5s-10,1.2-14.1,3.5c-4.1,2.3-7.4,5.6-9.8,10-2.4,4.3-3.6,9.5-3.6,15.5s1.2,11,3.6,15.4c2.4,4.4,5.7,7.8,9.8,10.1,4.1,2.3,8.8,3.5,14,3.5Z"/>
|
||||
<path d="M1412.3,169.7c-9.7,0-18.4-2.1-25.9-6.2-7.6-4.1-13.5-9.7-17.8-16.9-4.3-7.2-6.4-15.3-6.4-24.5s2.1-17.4,6.4-24.6c4.3-7.1,10.2-12.7,17.8-16.7,7.6-4,16.2-6.1,25.9-6.1s17,1.8,23.9,5.5c6.9,3.6,12.1,9,15.7,16.1l-16.7,9.7c-2.8-4.4-6.2-7.6-10.2-9.7-4-2.1-8.3-3.1-12.9-3.1s-10.1,1.2-14.4,3.5c-4.3,2.3-7.6,5.6-10.1,10-2.4,4.3-3.6,9.5-3.6,15.5s1.2,11.2,3.6,15.5c2.4,4.3,5.8,7.7,10.1,10,4.3,2.3,9.1,3.5,14.4,3.5s8.9-1,12.9-3.1c4-2.1,7.4-5.3,10.2-9.7l16.7,9.7c-3.6,6.9-8.8,12.3-15.7,16.1-6.9,3.8-14.8,5.6-23.9,5.6Z"/>
|
||||
<path d="M1499.2,169.7c-7.8,0-15.2-1-22.3-3-7.1-2-12.8-4.5-16.9-7.4l8.3-16.5c4.2,2.7,9.1,4.9,14.9,6.6,5.8,1.7,11.6,2.6,17.4,2.6s11.8-.9,14.8-2.8c3.1-1.8,4.6-4.3,4.6-7.5s-1-4.5-3.1-5.8c-2.1-1.3-4.8-2.3-8.2-3-3.4-.7-7.1-1.3-11.2-1.9-4.1-.6-8.2-1.4-12.3-2.3-4.1-1-7.8-2.4-11.2-4.3-3.4-1.9-6.1-4.5-8.2-7.7-2.1-3.2-3.1-7.5-3.1-12.8s1.7-11,5-15.4c3.4-4.3,8.1-7.7,14.1-10.1,6.1-2.4,13.3-3.6,21.6-3.6s12.6.7,18.9,2.1c6.4,1.4,11.6,3.4,15.8,5.9l-8.3,16.5c-4.4-2.7-8.8-4.5-13.3-5.5-4.5-1-8.9-1.5-13.3-1.5-6.6,0-11.5,1-14.7,2.9-3.2,2-4.8,4.5-4.8,7.5s1,4.9,3.1,6.2c2.1,1.4,4.8,2.5,8.2,3.3,3.4.8,7.1,1.5,11.2,2,4.1.5,8.2,1.3,12.2,2.3,4,1,7.8,2.5,11.2,4.3,3.4,1.8,6.2,4.3,8.2,7.5,2.1,3.2,3.1,7.5,3.1,12.7s-1.7,10.8-5.1,15.1c-3.4,4.3-8.2,7.6-14.5,10-6.2,2.4-13.7,3.6-22.4,3.6Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.3 KiB |
21
apps/docs/src/assets/light-logo.svg
Normal file
21
apps/docs/src/assets/light-logo.svg
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1558 207.2">
|
||||
<!-- Generator: Adobe Illustrator 28.6.0, SVG Export Plug-In . SVG Version: 1.2.0 Build 709) -->
|
||||
<g>
|
||||
<g id="Layer_1">
|
||||
<g id="icon" fill="#00af5c">
|
||||
<path d="M146.1,109.8l-14.4,17.6-24.1,7.6-10.8-12-61.9,37.1c-2.9-3.8-6.4-9.1-8.5-14.3l61.7-37-5.6-14.9,17.6-18.1,22.3-4.8,6.4,7.9-10.3,10.4-8.9,2.8-6.4,6.6,3.1,8.7,6.4,6.8,9-2.4,6.4-7,13.9-4.4s4.1,9.3,4.1,9.3Z" fill-rule="evenodd"/>
|
||||
<path d="M208.6,86.6l-48.9,13.2c-.8-4.7-1.6-8.9-4.3-16.1l49-13.2c2.1,5.5,3.5,10.9,4.2,16.1Z" fill-rule="evenodd"/>
|
||||
<path d="M33.7,110.5c3.5,41,37.9,73.2,79.7,73.2s59-18.4,72-45.1l15.9,5.5c-15.3,33.2-48.9,56.3-87.9,56.3S20.3,160.7,16.8,110.5c0,0,16.8,0,16.8,0ZM17.1,93.8C22,45,63.3,6.8,113.4,6.8s96.8,43.4,96.8,96.8-1.1,16.9-3.2,24.8l-15.9-5.5c1.6-6.3,2.4-12.8,2.3-19.3,0-44.2-35.9-80-80-80S38.8,54.3,34,93.8h-16.9,0Z" fill-rule="evenodd"/>
|
||||
<path d="M113.1,57c-25.7,0-46.6,20.9-46.6,46.7s20.9,46.7,46.7,46.7,2.6,0,3.9-.2l4.7,16.3c-2.8.4-5.7.6-8.5.6-35,0-63.4-28.4-63.4-63.4s28.4-63.4,63.4-63.4,1.7,0,2.6,0c0,0-2.6,16.7-2.6,16.7ZM132.2,43.2c25.7,8.1,44.4,32.1,44.4,60.5s-16,48.8-38.7,58.4l-4.6-16.2c15.8-7.5,26.7-23.6,26.7-42.2s-12.6-37.1-30.3-43.7l2.7-16.8h0Z" fill-rule="evenodd"/>
|
||||
</g>
|
||||
<path id="modrinth" fill="#000" d="M362,74.2c11.7,0,21.1,3.3,27.9,10.1,6.8,7,10.3,17.1,10.3,30.6v53.3h-21.8v-50.5c0-8.2-1.7-14.3-5.4-18.4-3.6-4-8.7-6.1-15.5-6.1s-13.2,2.4-17.6,7.1c-4.4,4.9-6.6,11.8-6.6,20.7v47.2h-21.8v-50.5c0-8.2-1.7-14.3-5.4-18.4-3.6-4-8.7-6.1-15.5-6.1s-13.2,2.4-17.6,7.1c-4.4,4.7-6.6,11.7-6.6,20.7v47.2h-21.8v-93h20.7v11.8c3.5-4.2,7.8-7.3,13.1-9.6,5.2-2.3,11-3.3,17.4-3.3s13.2,1.2,18.6,3.8c5.4,2.8,9.6,6.6,12.7,11.7,3.8-4.9,8.7-8.7,14.8-11.5,6.1-2.6,12.7-4,20-4h0ZM470.1,169.4c-9.4,0-17.9-2.1-25.4-6.1-7.4-3.9-13.5-9.8-17.6-17.1-4.4-7.1-6.4-15.3-6.4-24.6s2.1-17.4,6.4-24.5c4.2-7.2,10.3-13,17.6-16.9,7.5-4,16-6.1,25.4-6.1s18.1,2.1,25.6,6.1c7.5,4,13.4,9.8,17.8,16.9,4.2,7.1,6.3,15.3,6.3,24.5s-2.1,17.4-6.3,24.6c-4.4,7.3-10.3,13.1-17.8,17.1-7.5,4-16,6.1-25.6,6.1h0ZM470.1,150.8c8,0,14.6-2.6,19.9-8s7.8-12.4,7.8-21.1-2.6-15.7-7.8-21.1-11.8-8-19.9-8-14.6,2.6-19.7,8c-5.2,5.4-7.8,12.4-7.8,21.1s2.6,15.7,7.8,21.1c5,5.4,11.7,8,19.7,8ZM631.2,39v129.2h-20.9v-12c-3.6,4.3-8.1,7.7-13.2,9.9-5.4,2.3-11.1,3.3-17.6,3.3s-16.9-1.9-24-5.9-12.9-9.6-16.9-16.9c-4-7.1-6.1-15.5-6.1-24.9s2.1-17.8,6.1-24.9c4-7.1,9.8-12.7,16.9-16.7s15.1-5.9,24-5.9,11.8,1.1,16.9,3.1c5,2.1,9.5,5.3,13.1,9.4v-47.7h21.8,0ZM582.1,150.8c5.2,0,9.9-1.2,14.1-3.7,4.2-2.3,7.5-5.7,9.9-10.1,2.4-4.4,3.7-9.6,3.7-15.3s-1.2-11-3.7-15.3c-2.4-4.3-5.8-7.8-9.9-10.3-4.2-2.3-8.9-3.5-14.1-3.5s-9.9,1.2-14.1,3.5c-4.2,2.4-7.5,5.9-9.9,10.3-2.4,4.3-3.7,9.6-3.7,15.3s1.2,11,3.7,15.3c2.4,4.4,5.8,7.8,9.9,10.1,4.2,2.4,8.9,3.7,14.1,3.7ZM679.9,88.8c6.3-9.8,17.2-14.6,33.1-14.6v20.7c-1.7-.3-3.3-.5-5-.5-8.5,0-15.2,2.4-19.8,7.3-4.7,5.1-7.1,12.2-7.1,21.4v45.1h-21.8v-93h20.7v13.6h0ZM730.9,75.2h21.8v93h-21.8s0-93,0-93ZM741.9,59.9c-4,0-7.3-1.2-9.9-3.8-2.6-2.4-4-5.7-4-9.2,0-3.7,1.4-6.8,4-9.4,2.6-2.4,5.9-3.7,9.9-3.7s7.3,1.2,9.9,3.5c2.6,2.4,4,5.4,4,9s-1.2,7-3.8,9.6c-2.6,2.6-6.1,4-10.1,4ZM833.5,74.2c11.7,0,21.1,3.5,28.2,10.3s10.6,17.1,10.6,30.5v53.3h-21.8v-50.5c0-8.2-1.9-14.3-5.7-18.4-3.8-4-9.2-6.1-16.4-6.1s-14.3,2.4-19,7.1c-4.7,4.9-7,11.8-7,20.9v47h-21.8v-93h20.7v12c3.7-4.3,8.2-7.5,13.6-9.8s11.7-3.3,18.5-3.3h0ZM955.3,163.2c-2.7,2.2-5.9,3.8-9.2,4.7-3.8,1.1-7.7,1.6-11.7,1.6-10.3,0-18.1-2.6-23.7-8-5.6-5.4-8.4-13.1-8.4-23.3v-44.8h-15.3v-17.4h15.3v-21.2h21.8v21.2h24.9v17.4h-24.9v44.2c0,4.5,1,8,3.3,10.3,2.3,2.4,5.4,3.6,9.6,3.6s8.9-1.2,12.2-3.8l6.1,15.5h0ZM1025.5,74.2c11.7,0,21.1,3.5,28.2,10.3s10.6,17.1,10.6,30.5v53.3h-21.8v-50.5c0-8.2-1.9-14.3-5.8-18.4-3.8-4-9.2-6.1-16.4-6.1s-14.3,2.4-19,7.1c-4.7,4.9-7,11.8-7,20.9v47h-21.8V39h21.8v47c3.7-3.8,8-6.8,13.4-8.9,5.2-1.9,11.1-3,17.6-3h0Z"/>
|
||||
<g id="docs" fill="#00af5c">
|
||||
<path d="M1177.8,169.7c-8.9,0-16.9-2-24-6-7.1-4-12.7-9.5-16.7-16.6-4-7.1-6.1-15.4-6.1-25s2-17.9,6.1-25c4-7.1,9.6-12.6,16.7-16.5,7.1-3.9,15.1-5.9,24-5.9s14.7,1.7,20.8,5.1c6.1,3.4,11,8.6,14.6,15.5,3.6,6.9,5.4,15.9,5.4,26.7s-1.7,19.6-5.2,26.6c-3.5,7-8.3,12.2-14.4,15.7-6.1,3.5-13.2,5.2-21.2,5.2ZM1180.4,151.2c5.2,0,9.9-1.2,14-3.5,4.1-2.3,7.4-5.7,9.9-10.1,2.5-4.4,3.7-9.5,3.7-15.4s-1.2-11.2-3.7-15.5c-2.5-4.3-5.8-7.7-9.9-10-4.1-2.3-8.8-3.5-14-3.5s-9.9,1.2-14,3.5c-4.1,2.3-7.4,5.6-9.9,10-2.5,4.3-3.7,9.5-3.7,15.5s1.2,11,3.7,15.4c2.5,4.4,5.8,7.8,9.9,10.1,4.1,2.3,8.8,3.5,14,3.5ZM1208.6,168.5v-21.9l.9-24.6-1.7-24.6v-57.6h21.5v128.8h-20.7Z"/>
|
||||
<path d="M1299.5,169.7c-9.5,0-17.9-2.1-25.3-6.2-7.4-4.1-13.2-9.7-17.5-16.9-4.3-7.2-6.4-15.3-6.4-24.5s2.1-17.4,6.4-24.6c4.3-7.1,10.1-12.7,17.5-16.7,7.4-4,15.8-6.1,25.3-6.1s18.1,2,25.6,6.1c7.5,4.1,13.3,9.6,17.5,16.7,4.2,7.1,6.3,15.3,6.3,24.6s-2.1,17.3-6.3,24.5c-4.2,7.2-10.1,12.8-17.5,16.9-7.5,4.1-16,6.2-25.6,6.2ZM1299.5,151.2c5.3,0,10.1-1.2,14.2-3.5,4.2-2.3,7.4-5.7,9.8-10.1,2.4-4.4,3.6-9.5,3.6-15.4s-1.2-11.2-3.6-15.5c-2.4-4.3-5.6-7.7-9.8-10-4.2-2.3-8.8-3.5-14.1-3.5s-10,1.2-14.1,3.5c-4.1,2.3-7.4,5.6-9.8,10-2.4,4.3-3.6,9.5-3.6,15.5s1.2,11,3.6,15.4c2.4,4.4,5.7,7.8,9.8,10.1,4.1,2.3,8.8,3.5,14,3.5Z"/>
|
||||
<path d="M1412.3,169.7c-9.7,0-18.4-2.1-25.9-6.2-7.6-4.1-13.5-9.7-17.8-16.9-4.3-7.2-6.4-15.3-6.4-24.5s2.1-17.4,6.4-24.6c4.3-7.1,10.2-12.7,17.8-16.7,7.6-4,16.2-6.1,25.9-6.1s17,1.8,23.9,5.5c6.9,3.6,12.1,9,15.7,16.1l-16.7,9.7c-2.8-4.4-6.2-7.6-10.2-9.7-4-2.1-8.3-3.1-12.9-3.1s-10.1,1.2-14.4,3.5c-4.3,2.3-7.6,5.6-10.1,10-2.4,4.3-3.6,9.5-3.6,15.5s1.2,11.2,3.6,15.5c2.4,4.3,5.8,7.7,10.1,10,4.3,2.3,9.1,3.5,14.4,3.5s8.9-1,12.9-3.1c4-2.1,7.4-5.3,10.2-9.7l16.7,9.7c-3.6,6.9-8.8,12.3-15.7,16.1-6.9,3.8-14.8,5.6-23.9,5.6Z"/>
|
||||
<path d="M1499.2,169.7c-7.8,0-15.2-1-22.3-3-7.1-2-12.8-4.5-16.9-7.4l8.3-16.5c4.2,2.7,9.1,4.9,14.9,6.6,5.8,1.7,11.6,2.6,17.4,2.6s11.8-.9,14.8-2.8c3.1-1.8,4.6-4.3,4.6-7.5s-1-4.5-3.1-5.8c-2.1-1.3-4.8-2.3-8.2-3-3.4-.7-7.1-1.3-11.2-1.9-4.1-.6-8.2-1.4-12.3-2.3-4.1-1-7.8-2.4-11.2-4.3-3.4-1.9-6.1-4.5-8.2-7.7-2.1-3.2-3.1-7.5-3.1-12.8s1.7-11,5-15.4c3.4-4.3,8.1-7.7,14.1-10.1,6.1-2.4,13.3-3.6,21.6-3.6s12.6.7,18.9,2.1c6.4,1.4,11.6,3.4,15.8,5.9l-8.3,16.5c-4.4-2.7-8.8-4.5-13.3-5.5-4.5-1-8.9-1.5-13.3-1.5-6.6,0-11.5,1-14.7,2.9-3.2,2-4.8,4.5-4.8,7.5s1,4.9,3.1,6.2c2.1,1.4,4.8,2.5,8.2,3.3,3.4.8,7.1,1.5,11.2,2,4.1.5,8.2,1.3,12.2,2.3,4,1,7.8,2.5,11.2,4.3,3.4,1.8,6.2,4.3,8.2,7.5,2.1,3.2,3.1,7.5,3.1,12.7s-1.7,10.8-5.1,15.1c-3.4,4.3-8.2,7.6-14.5,10-6.2,2.4-13.7,3.6-22.4,3.6Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.3 KiB |
6
apps/docs/src/content/config.ts
Normal file
6
apps/docs/src/content/config.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { defineCollection } from 'astro:content';
|
||||
import { docsSchema } from '@astrojs/starlight/schema';
|
||||
|
||||
export const collections = {
|
||||
docs: defineCollection({ schema: docsSchema() }),
|
||||
};
|
4
apps/docs/src/content/docs/contributing/daedalus.md
Normal file
4
apps/docs/src/content/docs/contributing/daedalus.md
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
title: Daedalus (Metadata service)
|
||||
description: Guide for contributing to Modrinth's frontend
|
||||
---
|
52
apps/docs/src/content/docs/contributing/getting-started.md
Normal file
52
apps/docs/src/content/docs/contributing/getting-started.md
Normal file
@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Getting started
|
||||
description: How can I contribute to Modrinth?
|
||||
sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
# Contributing to Modrinth
|
||||
|
||||
Every public-facing aspect of Modrinth, including everything from our [API/backend][labrinth] and [frontend][knossos] to our [Gradle plugin][minotaur] and [launcher][theseus], is released under free and open source licenses on [GitHub]. As such, we love contributions from community members! Before proceeding to do so, though, there are a number of things you'll want to keep in mind throughout the process, as well as some details specific to certain projects.
|
||||
|
||||
## Things to keep in mind
|
||||
|
||||
### Consult people on Discord
|
||||
|
||||
There are a number of reasons to want to consult with people on our [Discord] before making a pull request. For example, if you're not sure whether something is a good idea or not, if you're not sure how to implement something, or if you can't get something working, these would all be good opportunities to create a thread in the `#development` forum channel.
|
||||
|
||||
If you intend to work on new features, to make significant codebase changes, or to make UI/design changes, please open a discussion thread first to ensure your work is put to its best use.
|
||||
|
||||
### Don't get discouraged
|
||||
|
||||
At times, pull requests may be rejected or left unmerged for a variation of reasons. Don't take it personally, and don't get discouraged! Sometimes a contribution just isn't the right fit for the time, or it might have just been lost in the mess of other things to do. Remember, the core Modrinth team are often busy, whether it be on a specific project/task or on external factors such as offline responsibilities. It all falls back to the same thing: don't get discouraged!
|
||||
|
||||
### Code isn't the only way to contribute
|
||||
|
||||
You don't need to know how to program to contribute to Modrinth. Quality assurance, supporting the community, coming up with feature ideas, and making sure your voice is heard in public decisions are all great ways to contribute to Modrinth. If you find bugs, reporting them on the appropriate issue tracker is your responsibility; however, remember that potential security breaches and exploits must instead be reported in accordance with our [security policy](https://modrinth.com/legal/security).
|
||||
|
||||
## Project-specific details
|
||||
|
||||
If you wish to contribute code to a specific project, here's the place to start. Most of Modrinth is written in the [Rust language](https://www.rust-lang.org), but some things are written in other languages/frameworks like [Nuxt.js](https://nuxtjs.org) or Java.
|
||||
|
||||
Most of Modrinth's code is in our monorepo, which you can find [here](https://github.com/modrinth/code). Our monorepo is powered by [Turborepo](https://turborepo.org).
|
||||
|
||||
Follow the project-specific instructions below to get started:
|
||||
- [Knossos (frontend)](/contributing/knossos)
|
||||
- [Theseus (Modrinth App)](/contributing/theseus)
|
||||
- [Minotaur (Gradle plugin)](/contributing/minotaur)
|
||||
- [Labrinth (API/backend)](/contributing/labrinth)
|
||||
- [Daedalus (Metadata service)](/contributing/daedalus)
|
||||
|
||||
### Documentation
|
||||
|
||||
The [documentation](https://github.com/modrinth/docs) (which you are reading right now!) is the place to find any and all general information about Modrinth and its API. The instructions are largely the same as [knossos](#knossos-frontend), except that the docs have no lint.
|
||||
|
||||
[Discord]: https://discord.modrinth.com
|
||||
[GitHub]: https://github.com/modrinth
|
||||
[knossos]: https://github.com/modrinth/code/tree/main/apps/frontend
|
||||
[labrinth]: https://github.com/modrinth/labrinth
|
||||
[theseus]: https://github.com/modrinth/theseus
|
||||
[minotaur]: https://github.com/modrinth/minotaur
|
||||
[Rust]: https://www.rust-lang.org/tools/install
|
||||
[pnpm]: https://pnpm.io
|
35
apps/docs/src/content/docs/contributing/knossos.md
Normal file
35
apps/docs/src/content/docs/contributing/knossos.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: Knossos (Frontend)
|
||||
description: Guide for contributing to Modrinth's frontend
|
||||
---
|
||||
|
||||
This project is our [monorepo](https://github.com/modrinth/code). You can find the frontend in the `apps/frontend` directory.
|
||||
|
||||
[knossos] is the Nuxt.js frontend. You will need to install [pnpm] and run the standard commands:
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm run web:dev
|
||||
```
|
||||
|
||||
Once that's done, you'll be serving knossos on `localhost:3000` with hot reloading. You can replace the `dev` in `pnpm run dev` with `build` to build for a production server and `start` to start the server. You can also use `pnpm run lint` to find any eslint problems, and `pnpm run fix` to try automatically fixing those problems.
|
||||
|
||||
<details>
|
||||
<summary>.env variables & command line options</summary>
|
||||
|
||||
#### Basic configuration
|
||||
|
||||
`SITE_URL`: The URL of the site (used for auth redirects). Default: `http://localhost:3000`
|
||||
`BASE_URL`: The base URL for the API. Default: `https://staging-api.modrinth.com/v2/`
|
||||
`BROWSER_BASE_URL`: The base URL for the API used in the browser. Default: `https://staging-api.modrinth.com/v2/`
|
||||
|
||||
</details>
|
||||
|
||||
#### Ready to open a PR?
|
||||
|
||||
If you're prepared to contribute by submitting a pull request, ensure you have met the following criteria:
|
||||
|
||||
- `pnpm run fix` has been run.
|
||||
|
||||
[knossos]: https://github.com/modrinth/code/tree/main/apps/frontend
|
||||
[pnpm]: https://pnpm.io
|
115
apps/docs/src/content/docs/contributing/labrinth.md
Normal file
115
apps/docs/src/content/docs/contributing/labrinth.md
Normal file
@ -0,0 +1,115 @@
|
||||
---
|
||||
title: Labrinth (API)
|
||||
description: Guide for contributing to Modrinth's backend
|
||||
---
|
||||
|
||||
|
||||
[labrinth] is the Rust-based backend serving Modrinth's API with the help of the [Actix](https://actix.rs) framework. To get started with a labrinth instance, install docker, docker-compose (which comes with Docker), and [Rust]. The initial startup can be done simply with the command `docker-compose up`, or with `docker compose up` (Compose V2 and later). That will deploy a PostgreSQL database on port 5432 and a MeiliSearch instance on port 7700. To run the API itself, you'll need to use the `cargo run` command, this will deploy the API on port 8000.
|
||||
|
||||
Now, you'll have to install the sqlx CLI, which can be done with cargo:
|
||||
|
||||
```bash
|
||||
cargo install --git https://github.com/launchbadge/sqlx sqlx-cli --no-default-features --features postgres,rustls
|
||||
```
|
||||
|
||||
From there, you can create the database and perform all database migrations with one simple command:
|
||||
|
||||
```bash
|
||||
sqlx database setup
|
||||
```
|
||||
|
||||
Finally, if on Linux, you will need the OpenSSL library. On Debian-based systems, this involves the `pkg-config` and `libssl-dev` packages.
|
||||
|
||||
To enable labrinth to create a project, you need to add two things.
|
||||
|
||||
1. An entry in the `loaders` table.
|
||||
2. An entry in the `loaders_project_types` table.
|
||||
|
||||
A minimal setup can be done from the command line with [psql](https://www.postgresql.org/docs/current/app-psql.html):
|
||||
|
||||
```bash
|
||||
psql --host=localhost --port=5432 -U <username, default is labrinth> -W
|
||||
```
|
||||
|
||||
The default password for the database is `labrinth`. Once you've connected, run
|
||||
|
||||
```sql
|
||||
INSERT INTO loaders VALUES (0, 'placeholder_loader');
|
||||
INSERT INTO loaders_project_types VALUES (0, 1); -- modloader id, supported type id
|
||||
INSERT INTO categories VALUES (0, 'placeholder_category', 1); -- category id, category, project type id
|
||||
```
|
||||
|
||||
This will initialize your database with a modloader called 'placeholder_loader', with id 0, and marked as supporting mods only. It will also create a category called 'placeholder_category' that is marked as supporting mods only
|
||||
If you would like 'placeholder_loader' to be marked as supporting modpacks too, run
|
||||
|
||||
```sql
|
||||
INSERT INTO loaders_project_types VALUES (0, 2); -- modloader id, supported type id
|
||||
```
|
||||
|
||||
If you would like 'placeholder_category' to be marked as supporting modpacks too, run
|
||||
|
||||
```sql
|
||||
INSERT INTO categories VALUES (0, 'placeholder_category', 2); -- modloader id, supported type id
|
||||
```
|
||||
|
||||
The majority of configuration is done at runtime using [dotenvy](https://crates.io/crates/dotenvy) and the `.env` file. Each of the variables and what they do can be found in the dropdown below. Additionally, there are three command line options that can be used to specify to MeiliSearch what you want to do.
|
||||
|
||||
<details>
|
||||
<summary>.env variables & command line options</summary>
|
||||
|
||||
#### Basic configuration
|
||||
|
||||
`DEBUG`: Whether debugging tools should be enabled
|
||||
`RUST_LOG`: Specifies what information to log, from rust's [`env-logger`](https://github.com/env-logger-rs/env_logger); a reasonable default is `info,sqlx::query=warn`
|
||||
`SITE_URL`: The main URL to be used for CORS
|
||||
`CDN_URL`: The publicly accessible base URL for files uploaded to the CDN
|
||||
`MODERATION_DISCORD_WEBHOOK`: The URL for a Discord webhook where projects pending approval will be sent
|
||||
`CLOUDFLARE_INTEGRATION`: Whether labrinth should integrate with Cloudflare's spam protection
|
||||
`DATABASE_URL`: The URL for the PostgreSQL database
|
||||
`DATABASE_MIN_CONNECTIONS`: The minimum number of concurrent connections allowed to the database at the same time
|
||||
`DATABASE_MAX_CONNECTIONS`: The maximum number of concurrent connections allowed to the database at the same time
|
||||
`MEILISEARCH_ADDR`: The URL for the MeiliSearch instance used for search
|
||||
`MEILISEARCH_KEY`: The name that MeiliSearch is given
|
||||
`BIND_ADDR`: The bind address for the server. Supports both IPv4 and IPv6
|
||||
`MOCK_FILE_PATH`: The path used to store uploaded files; this has no default value and will panic if unspecified
|
||||
|
||||
#### CDN options
|
||||
|
||||
`STORAGE_BACKEND`: Controls what storage backend is used. This can be either `local`, `backblaze`, or `s3`, but defaults to `local`
|
||||
|
||||
The Backblaze and S3 configuration options are fairly self-explanatory in name, so here's simply their names:
|
||||
`BACKBLAZE_KEY_ID`, `BACKBLAZE_KEY`, `BACKBLAZE_BUCKET_ID`
|
||||
`S3_ACCESS_TOKEN`, `S3_SECRET`, `S3_URL`, `S3_REGION`, `S3_BUCKET_NAME`
|
||||
|
||||
#### Search, OAuth, and miscellaneous options
|
||||
|
||||
`LOCAL_INDEX_INTERVAL`: The interval, in seconds, at which the local database is reindexed for searching. Defaults to `3600` seconds (1 hour).
|
||||
`VERSION_INDEX_INTERVAL`: The interval, in seconds, at which versions are reindexed for searching. Defaults to `1800` seconds (30 minutes).
|
||||
|
||||
The OAuth configuration options are fairly self-explanatory. For help setting up authentication, please contact us on [Discord].
|
||||
|
||||
`RATE_LIMIT_IGNORE_IPS`: An array of IPs that should have a lower rate limit factor. This can be useful for allowing the front-end to have a lower rate limit to prevent accidental timeouts.
|
||||
|
||||
#### Command line options
|
||||
|
||||
`--skip-first-index`: Skips indexing the local database on startup. This is useful to prevent doing unnecessary work when frequently restarting.
|
||||
`--reconfigure-indices`: Resets the MeiliSearch settings for the search indices and exits.
|
||||
`--reset-indices`: Resets the MeiliSearch indices and exits; this clears all previously indexed mods.
|
||||
|
||||
</details>
|
||||
|
||||
#### Ready to open a PR?
|
||||
|
||||
If you're prepared to contribute by submitting a pull request, ensure you have met the following criteria:
|
||||
|
||||
- `cargo fmt` has been run.
|
||||
- `cargo clippy` has been run.
|
||||
- `cargo check` has been run.
|
||||
- `cargo sqlx prepare` has been run.
|
||||
|
||||
> Note: If you encounter issues with `sqlx` saying 'no queries found' after running `cargo sqlx prepare`, you may need to ensure the installed version of `sqlx-cli` matches the current version of `sqlx` used [in labrinth](https://github.com/modrinth/labrinth/blob/master/Cargo.toml).
|
||||
|
||||
[Discord]: https://discord.modrinth.com
|
||||
[GitHub]: https://github.com/modrinth
|
||||
[labrinth]: https://github.com/modrinth/labrinth
|
||||
[Rust]: https://www.rust-lang.org/tools/install
|
10
apps/docs/src/content/docs/contributing/minotaur.md
Normal file
10
apps/docs/src/content/docs/contributing/minotaur.md
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
title: Minotaur (Gradle plugin)
|
||||
description: Guide for contributing to Modrinth's gradle plugin
|
||||
---
|
||||
|
||||
[Minotaur][minotaur] is the Gradle plugin used to automatically publish artifacts to Modrinth. To run your copy of the plugin in a project, publish it to your local Maven with `./gradlew publishToMavenLocal` and add `mavenLocal()` to your buildscript.
|
||||
|
||||
Minotaur contains two test environments within it - one with ForgeGradle and one with Fabric Loom. You may tweak with these environments to test whatever you may be trying; just make sure that the `modrinth` task within each still functions properly. GitHub Actions will validate this if you're making a pull request, so you may want to use [`act pull_request`](https://github.com/nektos/act) to test them locally.
|
||||
|
||||
[minotaur]: https://github.com/modrinth/minotaur
|
43
apps/docs/src/content/docs/contributing/theseus.md
Normal file
43
apps/docs/src/content/docs/contributing/theseus.md
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
title: Theseus (Modrinth App)
|
||||
description: Guide for contributing to Modrinth's desktop app
|
||||
---
|
||||
|
||||
This project is our [monorepo](https://github.com/modrinth/code).
|
||||
|
||||
[theseus] is the Tauri-based launcher that lets users conveniently play any mod or modpack on Modrinth. It uses the Rust-based Tauri as the backend and Vue.js as the frontend. To get started, install [pnpm], [Rust], and the [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/) for your system. Then, run the following commands:
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm run app:dev
|
||||
```
|
||||
|
||||
Once the commands finish, you'll be viewing a Tauri window with Nuxt.js hot reloading.
|
||||
|
||||
You can use `pnpm run lint` to find any eslint problems, and `pnpm run fix` to try automatically fixing those problems.
|
||||
|
||||
### Theseus Architecture
|
||||
|
||||
Theseus is split up into three parts:
|
||||
- `apps/app-frontend`: The Vue.JS frontend for the app
|
||||
- `packages/app-lib`: The library holding all the core logic for the desktop app
|
||||
- `apps/app`: The Tauri-based Rust app. This primarily wraps around the library with some additional logic for Tauri.
|
||||
|
||||
The app's internal database is stored in SQLite. For production builds, this is found at <APPDIR>/app.db.
|
||||
|
||||
When running SQLX commands, be sure to set the `DATABASE_URL` environment variable to the path of the database.
|
||||
|
||||
You can edit the app's data directory using the `THESEUS_CONFIG_DIR` environment variable.
|
||||
|
||||
#### Ready to open a PR?
|
||||
|
||||
If you're prepared to contribute by submitting a pull request, ensure you have met the following criteria:
|
||||
|
||||
- Run `pnpm run fix` to address any fixable issues automatically.
|
||||
- Run `cargo fmt` to format Rust-related code.
|
||||
- Run `cargo clippy` to validate Rust-related code.
|
||||
- Run `cargo sqlx prepare --package theseus` if you've changed any SQL code to validate statements.
|
||||
|
||||
[theseus]: https://github.com/modrinth/code/tree/main/apps/app
|
||||
[Rust]: https://www.rust-lang.org/tools/install
|
||||
[pnpm]: https://pnpm.io
|
15
apps/docs/src/content/docs/index.mdx
Normal file
15
apps/docs/src/content/docs/index.mdx
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Modrinth docs
|
||||
description: Developer documentation for Modrinth!
|
||||
template: splash
|
||||
hero:
|
||||
tagline: Developer documentation for Modrinth
|
||||
actions:
|
||||
- text: API documentation
|
||||
link: /api
|
||||
icon: right-arrow
|
||||
- text: Get support with Modrinth
|
||||
link: https://support.modrinth.com
|
||||
icon: external
|
||||
variant: minimal
|
||||
---
|
2
apps/docs/src/env.d.ts
vendored
Normal file
2
apps/docs/src/env.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/// <reference path="../.astro/types.d.ts" />
|
||||
/// <reference types="astro/client" />
|
54
apps/docs/src/styles/modrinth.css
Normal file
54
apps/docs/src/styles/modrinth.css
Normal file
@ -0,0 +1,54 @@
|
||||
:root,
|
||||
::backdrop,
|
||||
:root[data-theme='light'],
|
||||
[data-theme='light'] ::backdrop{
|
||||
--sl-font-system: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Roboto,
|
||||
Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||
|
||||
--sl-color-white: var(--color-contrast); /* “white” */
|
||||
--sl-color-gray-1: var(--color-base);
|
||||
--sl-color-gray-2: var(--color-base);
|
||||
--sl-color-gray-3: var(--color-base);
|
||||
--sl-color-gray-4: var(--color-raised-bg);
|
||||
--sl-color-gray-5: var(--color-button-bg);
|
||||
--sl-color-gray-6: var(--color-raised-bg);
|
||||
--sl-color-black: var(--color-accent-contrast);
|
||||
|
||||
--sl-color-accent-low: var(--color-green-highlight);
|
||||
--sl-color-accent: var(--color-brand);
|
||||
--sl-color-accent-high: var(--color-brand-highlight);
|
||||
|
||||
--sl-color-orange-low: var(--color-orange-highlight);
|
||||
--sl-color-orange: var(--color-orange);
|
||||
--sl-color-orange-high: var(--color-orange-highlight);
|
||||
|
||||
--sl-color-green-low: var(--color-green-highlight);
|
||||
--sl-color-green: var(--color-green);
|
||||
--sl-color-green-high: var(--color-green-highlight);
|
||||
|
||||
--sl-color-blue-low: var(--color-blue-highlight);
|
||||
--sl-color-blue: var(--color-blue);
|
||||
--sl-color-blue-high: var(--color-blue-highlight);
|
||||
|
||||
--sl-color-purple-low: var(--color-purple-highlight);
|
||||
--sl-color-purple: var(--color-purple);
|
||||
--sl-color-purple-high: var(--color-purple-highlight);
|
||||
|
||||
--sl-color-red-low: var(--color-red-highlight);
|
||||
--sl-color-red: var(--color-red);
|
||||
--sl-color-red-high: var(--color-red-highlight);
|
||||
|
||||
--sl-color-text: var(--color-base);
|
||||
--sl-color-text-accent: var(--color-brand);
|
||||
--sl-color-text-invert: var(--color-accent-contrast);
|
||||
--sl-color-bg: var(--color-bg);
|
||||
--sl-color-bg-nav: var(--color-raised-bg);
|
||||
--sl-color-bg-sidebar: var(--color-raised-bg);
|
||||
--sl-color-bg-inline-code: var(--color-button-bg);
|
||||
--sl-color-bg-accent: var(--color-brand-highlight);
|
||||
}
|
||||
|
||||
:root[data-theme='light'],
|
||||
[data-theme='light'] ::backdrop{
|
||||
--sl-color-bg: var(--color-raised-bg);
|
||||
}
|
3
apps/docs/tsconfig.json
Normal file
3
apps/docs/tsconfig.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict"
|
||||
}
|
@ -6,6 +6,7 @@
|
||||
"web:dev": "turbo run dev --filter=@modrinth/frontend",
|
||||
"web:build": "turbo run build --filter=@modrinth/frontend",
|
||||
"app:dev": "turbo run dev --filter=@modrinth/app",
|
||||
"docs:dev": "turbo run dev --filter=@modrinth/docs",
|
||||
"app:build": "turbo run build --filter=@modrinth/app",
|
||||
"pages:build": "NITRO_PRESET=cloudflare-pages pnpm --filter frontend run build",
|
||||
"build": "turbo run build --continue",
|
||||
|
@ -26,7 +26,8 @@ html {
|
||||
}
|
||||
|
||||
.light-mode,
|
||||
.light {
|
||||
.light,
|
||||
:root[data-theme='light'] {
|
||||
--color-bg: #e5e7eb;
|
||||
--color-raised-bg: #ffffff;
|
||||
--color-super-raised-bg: #e9e9e9;
|
||||
@ -71,7 +72,8 @@ html {
|
||||
}
|
||||
|
||||
.dark-mode,
|
||||
.dark {
|
||||
.dark,
|
||||
:root[data-theme='dark'] {
|
||||
--color-bg: #16181c;
|
||||
--color-raised-bg: #26292f;
|
||||
--color-super-raised-bg: #40434a;
|
||||
|
4671
pnpm-lock.yaml
generated
4671
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user