From c571dccc6110c6ac4a3befb9828e8df7ed0b9afc Mon Sep 17 00:00:00 2001 From: DecDuck Date: Wed, 28 Jan 2026 20:29:00 +1100 Subject: [PATCH] feat: creating library page --- docs/astro.config.mjs | 9 +++- docs/package.json | 1 + docs/pnpm-lock.yaml | 19 +++++++++ .../docs/admin/guides/creating-library.md | 5 --- .../docs/admin/guides/creating-library.mdx | 41 +++++++++++++++++++ .../docs/reference/library-sources.mdx | 4 +- 6 files changed, 70 insertions(+), 9 deletions(-) delete mode 100644 docs/src/content/docs/admin/guides/creating-library.md create mode 100644 docs/src/content/docs/admin/guides/creating-library.mdx diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index fbbde6c9..aae93f91 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -2,13 +2,18 @@ import { defineConfig } from "astro/config"; import starlight from "@astrojs/starlight"; import starlightThemeRapide from "starlight-theme-rapide"; -import starlightLinksValidator from 'starlight-links-validator' +import starlightLinksValidator from "starlight-links-validator"; +import starlightImageZoom from "starlight-image-zoom"; // https://astro.build/config export default defineConfig({ integrations: [ starlight({ - plugins: [starlightThemeRapide(), starlightLinksValidator()], + plugins: [ + starlightThemeRapide(), + starlightLinksValidator(), + starlightImageZoom(), + ], title: "Drop OSS", social: [ { diff --git a/docs/package.json b/docs/package.json index 11948935..b7fae269 100644 --- a/docs/package.json +++ b/docs/package.json @@ -13,6 +13,7 @@ "@astrojs/starlight": "^0.37.4", "astro": "^5.6.1", "sharp": "^0.34.2", + "starlight-image-zoom": "^0.13.2", "starlight-links-validator": "^0.19.2", "starlight-theme-rapide": "^0.5.2" } diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index 87561452..7087088d 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: sharp: specifier: ^0.34.2 version: 0.34.5 + starlight-image-zoom: + specifier: ^0.13.2 + version: 0.13.2(@astrojs/starlight@0.37.4(astro@5.16.15(rollup@4.57.0)(typescript@5.9.3))) starlight-links-validator: specifier: ^0.19.2 version: 0.19.2(@astrojs/starlight@0.37.4(astro@5.16.15(rollup@4.57.0)(typescript@5.9.3)))(astro@5.16.15(rollup@4.57.0)(typescript@5.9.3)) @@ -1546,6 +1549,12 @@ packages: space-separated-tokens@2.0.2: resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + starlight-image-zoom@0.13.2: + resolution: {integrity: sha512-fDJrx+UZXhkbhEeXKoRogTKAYtrYVJPw6wmSUI3nHUTA0vuRM6EI//2Z8bzv3Ecvz0pHKD1vAxtS01mLyessBA==} + engines: {node: '>=18'} + peerDependencies: + '@astrojs/starlight': '>=0.32.0' + starlight-links-validator@0.19.2: resolution: {integrity: sha512-IHeK3R78fsmv53VfRkGbXkwK1CQEUBHM9QPzBEyoAxjZ/ssi5gjV+F4oNNUppTR48iPp+lEY0MTAmvkX7yNnkw==} engines: {node: '>=18.17.1'} @@ -3932,6 +3941,16 @@ snapshots: space-separated-tokens@2.0.2: {} + starlight-image-zoom@0.13.2(@astrojs/starlight@0.37.4(astro@5.16.15(rollup@4.57.0)(typescript@5.9.3))): + dependencies: + '@astrojs/starlight': 0.37.4(astro@5.16.15(rollup@4.57.0)(typescript@5.9.3)) + mdast-util-mdx-jsx: 3.2.0 + rehype-raw: 7.0.0 + unist-util-visit: 5.1.0 + unist-util-visit-parents: 6.0.2 + transitivePeerDependencies: + - supports-color + starlight-links-validator@0.19.2(@astrojs/starlight@0.37.4(astro@5.16.15(rollup@4.57.0)(typescript@5.9.3)))(astro@5.16.15(rollup@4.57.0)(typescript@5.9.3)): dependencies: '@astrojs/starlight': 0.37.4(astro@5.16.15(rollup@4.57.0)(typescript@5.9.3)) diff --git a/docs/src/content/docs/admin/guides/creating-library.md b/docs/src/content/docs/admin/guides/creating-library.md deleted file mode 100644 index 6e71c0b6..00000000 --- a/docs/src/content/docs/admin/guides/creating-library.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Creating a library ---- -To import games and start using Drop, you must first create a library to import from. - diff --git a/docs/src/content/docs/admin/guides/creating-library.mdx b/docs/src/content/docs/admin/guides/creating-library.mdx new file mode 100644 index 00000000..5599edca --- /dev/null +++ b/docs/src/content/docs/admin/guides/creating-library.mdx @@ -0,0 +1,41 @@ +--- +title: Creating a library +--- + +import { Steps } from "@astrojs/starlight/components"; + +To import games and start using Drop, you must first create a library to import from. + + + +1. **Decide on a library layout.** + + Drop supports different layouts for your files on disk, you can read more about them in the [Library Sources](/reference/library-sources) reference section. + +2. **Mount your library in the Docker container.** + + For Drop to access your library, you must mount it within the Docker container. + + ```diff + drop: + image: ghcr.io/drop-oss/drop:latest + ... + volumes: + + - /mnt/media/my-drop-library:/library + ``` + + Where: + - `/mnt/media/my-drop-library` is the path to your library. + - `/library` is a **unique** path inside the container. **Use something else if another volume mounts to `/library`**. + + If you followed the [Quickstart](../quickstart.md) guide, you'll have already set up a library at `./library` pointing to `/library` within the container. You may want to instead edit that line in the `volumes` section to point to where your library is located. + +3. **Open library source interface in Admin Dashboard.** + + Head to your admin dashboard, and click on the "Library" tab. Then, in the top rightmost corner, click on "Sources". + +4. **Create your library source.** + + Use the "Create" button in the top right to create your library source. Use the **path from inside the container** when providing the path for the library, like `/library` from Step 2. + + diff --git a/docs/src/content/docs/reference/library-sources.mdx b/docs/src/content/docs/reference/library-sources.mdx index 3a38e1e4..a83ef841 100644 --- a/docs/src/content/docs/reference/library-sources.mdx +++ b/docs/src/content/docs/reference/library-sources.mdx @@ -50,9 +50,9 @@ So your game has gotten an update and you've got new files. All you need to do i If you have files that you're supposed to **paste over the previous version**, Drop supports that! Read [Update mode](./update-mode.mdx) to find out more. -# Flat-style or 'compat' +# Compatibility (flat-style) -This is a more commonly used layout for game libraries, but doesn't support all of Drop's features. It's useful when you want to migrate to Drop from another application or having an existing library. **We recommend [Drop-style](#drop-style) libraries if you're starting from scratch**. +This is a more commonly used layout for game libraries, but doesn't support all of Drop's features. It's useful when you want to migrate to Drop from another application or have an existing library. **We recommend [Drop-style](#drop-style) libraries if you're starting from scratch**. ## Structuring your library