feat: Third-Party Resources - #44
Draft
ethan-davies wants to merge 6 commits into
Draft
Conversation
Member
|
yes markdown would be way better. you can use frontmatter to specify values: ---
name: foo
description: awesome stuff
---
```js
console.log("hi");
``` |
Author
|
I just changed it to use markdown, now you would do something like so: ---
title: "Example Snippet"
description: "Example CSS snippet that does something"
author: "User1, User2 and User3"
target: "web"
type: "CSS Snippet"
---
<!-- Your markdown --> |
Member
|
should this be part of the structured content, or should we have a separate system for handling this so it's easier for users to submit, and we just SSR it into existence? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request introduces the addition of Third-Party resources. This tab will contain the following resources:
It includes filters allowing you to sort by Desktop/Web or search by name, author, and description.
To add plugins, you would create a .json file in src/content/third-party, structured as follows:
{ "name": "Album as Spotify Controls Background", "description": "Use album cover as SpotifyControls background", "tags": ["utility"], "authors": [{ "name": "Vee", "id": "343383572805058560" }], "dependencies": ["dependency1", "dependency2"], "hasPatches": false, "hasCommands": false, "required": false, "enabledByDefault": false, "target": "discordDesktop", "github": "", // Only required for plugins "code": "#vc-spotify-player {\n --blur-amount: 2px; /* higher px = stronger blur, 0 = no blur */\n --darken-percent: 0.8; /* 0 = album cover is not darkened, 1 = album cover is darkened fully (black) */\n}\n\n#vc-spotify-player {\n background: transparent !important;\n position: relative;\n}\n\n#vc-spotify-player > * {\n position: relative;\n z-index: 1;\n}\n\n#vc-spotify-player::after {\n content: '';\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n background: linear-gradient(rgba(0, 0, 0, var(--darken-percent)),\n rgba(0, 0, 0, var(--darken-percent))), var(--vc-spotify-track-image);\n background-size: cover;\n filter: blur(var(--blur-amount));\n clip-path: inset(0);\n}", // Only required for snippets "slug": "spotify", "type": "css-snippet" }Important Details:
\nto flatten the code within the JSON file. Various online tools can help with this process, ensuring proper formatting.1plugin,js-snippet, orcss-snippet.Screenshots
Footnotes
I am considering swapping this to
.mdso you can just use codeblocks and also add your own custom information (as nessacary) ↩