diff --git a/docs/geyser/supported-hosting-providers.md b/docs/geyser/supported-hosting-providers.md deleted file mode 100644 index dc0760a..0000000 --- a/docs/geyser/supported-hosting-providers.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Supported Hosting Providers ---- - -:::danger - -This list is incomplete. Please open a PR or contact us on Discord if the information is incorrect or you want to add a new hosting provider! - -::: - -:::caution - -It should also be noted that these providers may not be verified by the Geyser team, and the server providers below are reported as working by members of the community. - -::: - -:::caution - -Using a "Free Host" may not give you the best experience at all. If you want better support, more freedom to control your server, and learn how to run one, PLEASE pay for a server. - -::: - -:::info - -The below information is for the plugin versions of Geyser unless otherwise specified - -::: - -[//]: # () -[//]: # (## Built-in Geyser) - -[//]: # ({% for provider in site.data.providers.built_in %}) - -[//]: # (* [{{ provider.name}}]({{ provider.url }}){% if provider.description != nil or provider.description_template != nil %} - {{ site.data.providers.description_templates[provider.description_template] }} {{ provider.description }}{% endif %}) - -[//]: # ({% endfor %}) - -[//]: # () -[//]: # (## Support for Geyser) - -[//]: # ({% for provider in site.data.providers.support %}) - -[//]: # (* [{{ provider.name}}]({{ provider.url }}){% if provider.description != nil or provider.description_template != nil %} - {{ site.data.providers.description_templates[provider.description_template] }} {{ provider.description }}{% endif %}) - -[//]: # ({% endfor %}) - -[//]: # () -[//]: # (## Does not support Geyser) - -[//]: # ({% for provider in site.data.providers.no_support %}) - -[//]: # (* [{{ provider.name}}]({{ provider.url }}){% if provider.description != nil or provider.description_template != nil %} - {{ site.data.providers.description_templates[provider.description_template] }} {{ provider.description }}{% endif %}) - -[//]: # ({% endfor %}) diff --git a/docs/geyser/supported-hosting-providers.mdx b/docs/geyser/supported-hosting-providers.mdx new file mode 100644 index 0000000..c036d9f --- /dev/null +++ b/docs/geyser/supported-hosting-providers.mdx @@ -0,0 +1,41 @@ +--- +title: Supported Hosting Providers +--- + +import { Provider } from "../../src/components/Provider"; + +:::danger + +This list is incomplete. Please open a PR or contact us on Discord if the information is incorrect or you want to add a new hosting provider! + +::: + +:::caution + +It should also be noted that these providers may not be verified by the Geyser team, and the server providers below are reported as working by members of the community. + +::: + +:::caution + +Using a "Free Host" may not give you the best experience at all. If you want better support, more freedom to control your server, and learn how to run one, PLEASE pay for a server. + +::: + +:::info + +The below information is for the plugin versions of Geyser unless otherwise specified + +::: + +## Built-in Geyser + + + +## Support for Geyser + + + +## Does not support Geyser + + diff --git a/package.json b/package.json index f8de739..1595a90 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "clsx": "^1.2.1", "prism-react-renderer": "^2.1.0", "react": "^18.0.0", - "react-dom": "^18.0.0" + "react-dom": "^18.0.0", + "react-markdown": "^9.0.0" }, "devDependencies": { "@docusaurus/module-type-aliases": "3.0.0", diff --git a/src/components/Provider.tsx b/src/components/Provider.tsx new file mode 100644 index 0000000..c001230 --- /dev/null +++ b/src/components/Provider.tsx @@ -0,0 +1,29 @@ +import type {Providers, HostingProvider, ProviderType} from "@site/src/types/providers"; +import ReactMarkdown from "react-markdown"; + +export const noP = (props: { children: any; }) => { + const { children } = props; + return children; +} + +export const Provider = ({type}) => { + const data: Providers = require('@site/_data/providers.json') + const providers: HostingProvider[] = data[type as ProviderType] + + console.log(data, type, providers) + + return ( +
+
    {providers.map((provider: HostingProvider) => ( +
  • + {provider.name} + {provider.description != null || provider.description_template != null ? ( + + ) : ( + '' + )} +
  • + ))}
+
+ ) +} diff --git a/src/types/providers.ts b/src/types/providers.ts new file mode 100644 index 0000000..a424970 --- /dev/null +++ b/src/types/providers.ts @@ -0,0 +1,20 @@ +export type HostingProvider = { + name: string; + url: string; + description?: string; + description_template?: "default" | "ip_and_port" | "forwarding_option" | "java_ip"; +} + +export type ProviderType = "built_in" | "support" | "no_support"; + +export type Providers = { + description_templates: { + default: string; + ip_and_port: string; + forwarding_option: string; + java_ip: string; + }, + built_in: HostingProvider[]; + support: HostingProvider[]; + no_support: HostingProvider[]; +}