From 903d146683ade5c1aafcdb9b00f6ff9e8b6a2fa8 Mon Sep 17 00:00:00 2001 From: Korbs Date: Tue, 26 Nov 2024 00:15:22 -0500 Subject: [PATCH] Remove all unused stuff --- README.md | 47 ------ minpluto-search.json | 1 - search-sh.sh | 39 ----- search.js | 13 -- src/components/Service.astro | 3 - src/components/blog/posts.astro | 112 +++++++++----- src/components/docs/SearchBox.astro | 199 ------------------------- src/components/docs/search.jsx | 34 ----- src/components/init/SoftwareItem.astro | 3 +- src/components/keystatic/Image.astro | 8 - src/layouts/Document.astro | 3 - zorn-search.json | 1 - 12 files changed, 79 insertions(+), 384 deletions(-) delete mode 100644 README.md delete mode 100644 minpluto-search.json delete mode 100644 search-sh.sh delete mode 100644 search.js delete mode 100644 src/components/docs/SearchBox.astro delete mode 100644 src/components/docs/search.jsx delete mode 100644 src/components/keystatic/Image.astro delete mode 100644 zorn-search.json diff --git a/README.md b/README.md deleted file mode 100644 index e34a99b..0000000 --- a/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Astro Starter Kit: Minimal - -```sh -npm create astro@latest -- --template minimal -``` - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal) -[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal) -[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json) - -> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! - -## 🚀 Project Structure - -Inside of your Astro project, you'll see the following folders and files: - -```text -/ -├── public/ -├── src/ -│ └── pages/ -│ └── index.astro -└── package.json -``` - -Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. - -There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. - -Any static assets, like images, can be placed in the `public/` directory. - -## 🧞 Commands - -All commands are run from the root of the project, from a terminal: - -| Command | Action | -| :------------------------ | :----------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:4321` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | -| `npm run astro -- --help` | Get help using the Astro CLI | - -## 👀 Want to learn more? - -Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). diff --git a/minpluto-search.json b/minpluto-search.json deleted file mode 100644 index 4729fb8..0000000 --- a/minpluto-search.json +++ /dev/null @@ -1 +0,0 @@ -[{"id":40,"title":"Introduction","body":"MinPluto is a modern privacy frontend for YouTube giving you total anonymity. It provides additional features such an account system with an anomyous option, no annoying ads, multilingual support, custom video player, and additional customization.nn***MinPluto is currently in early alpha stages, so a lot of features that were mentioned above may not be present in the current product.***nn## FAQnn**Can I use MinPluto on this device?**nnFor devices with a web browser built-in, MinPluto will run in it. However, MinPluto does not have a dedicated app for devices like Roku, Amazon Firestick, Google TV, and any other Smart TV device along with gaming consoles.nnFor mobile users, you can install MinPluto from your browser as an app, if the browser has that option.nn**Will there be a Android/iOS app?**nnFor now, MinPluto is planned to be only a web application that can be accessed via a web browser. There are currently no plans to build a mobile application.nn**Can I create an account?**nnMinPluto is currently in an early alpha stage, which does not yet have an account system for you to use. There are plans to add one which will also will include an anomyous mode for privacy-focused users.nn**What data does MinPluto collect?**nnMinPluto by itself does not collect any data about you or any other user.nnHowever, please keep in mind that on other MinPluto instances, the instance operator can log your IP address like any other server could.nn**What is a YouTube frontend?**nnA frontend is it’s own UI and service that serves data from another platform such as YouTube, Twitter, Reddit, etc.nn**Why use a different frontend and not use the real thing?**nnThere are multiple reasons to use a frontend like MinPluto. Reasons such as like privacy, to avoid being tracked from invasive companies; speed, to avoid the bloated pages that these platforms have…frontends are commonly lightweight; and another reason is maybe to avoid ads, all frontends don’t serve ads like these platforms do.n","url":"/docs/minpluto/introduction"},{"id":36,"title":"Self-Hosting","body":"## Hardware Requirementsnn| Minimium | Recommended |n| ---------------------------------------- | ---------------------------------------- |n| 10GB of Disk Space | 60GB of Disk Space |n| 512MB | 4GB |n| 1 Core | 2 Core |n| 10TB of Traffic (Unlimited is preferred) | 20TB of Traffic (Unlimited is preferred) |nn## Installationnn### Docker Compose Method (Recommended)nnPlease make sure that the Docker Engine is installed on your system before continuing.nnClone MinPluto somewhere on your system:nnTerminal windownn```ngit clone https://sudovanilla.com/code/MinPluto/MinPluto/n```nncd MinPlutonnThen, edit the included `config.json` file:nn```n{n"SERVER_DOMAIN": https://example.org",nn"SERVER_ADMIN": "Company LLC",nn"SERVER_LOCATION": "Undisclosed",nn"STATISTICS": false,nn"ANALYLICS_TOOL": ,nn"ANALYLICS_ID": ,nn"SCRIPT_SRC": ,nn"DOMAIN": "example.org",nn"DEFAULT_VIDEO_PROXY": https://v.minpluto.org",nn"DEFAULT_DATA_PROXY": https://v.minpluto.org",nn"DEFAULT_IMAGE_PROXY": https://i.minpluto.org",nn"DEFAULT_PLAYER": "Zorn",nn"SIDEBAR_CATEGORIES": true,nn"SIDEBAR_DISCOVER": false,nn"MODIFIED": false,nn"CUSTOM_SOURCE_CODE": nn}n```nnYou should at the least edit `SERVER_DOMAIN` and `SERVER_ADMIN`. If you have an analytics tool that you use like Plausible or Umami, the configuration will work with them.nnIf you plan to make any changes to MinPluto on your instance, you must make it public and state what you’ve changed, and provide a link to the modified source code in `CUSTOM_SOURCE_CODE`.nnYou can now launch MinPluto:nnTerminal windownn```ndocker compose up -d # sudo may be required depending on your setupn```nnMinPluto should launch on the default port, which should be at [http://0.0.0.0:1930](http://0.0.0.0:1930). An image proxy is added to the Docker Compose file, which should be on port `1931`.nn### ManualnnYou’ll need to install either NodeJS or Bun.nnClone MinPluto somewhere on your system:nnTerminal windownn```ngit clone https://sudovanilla.com/code/MinPluto/MinPluto/n```nncd MinPlutonnThen, edit the included `config.json` file:nn```n{n"SERVER_DOMAIN": https://example.org",nn"SERVER_ADMIN": "Company LLC",nn"SERVER_LOCATION": "Undisclosed",nn"STATISTICS": false,nn"ANALYLICS_TOOL": ,nn"ANALYLICS_ID": ,nn"SCRIPT_SRC": ,nn"DOMAIN": "example.org",nn"DEFAULT_VIDEO_PROXY": https://v.minpluto.org",nn"DEFAULT_DATA_PROXY": https://v.minpluto.org",nn"DEFAULT_IMAGE_PROXY": https://i.minpluto.org",nn"DEFAULT_PLAYER": "Zorn",nn"SIDEBAR_CATEGORIES": true,nn"SIDEBAR_DISCOVER": false,nn"MODIFIED": false,nn"CUSTOM_SOURCE_CODE": nn}n```nnYou should at the least edit `DEFAULT_IMAGE_PROXY`, `SERVER_DOMAIN`, and `SERVER_ADMIN`. If you have an analytics tool that you use like Plausible or Umami, the configuration will work with them.nnIf you plan to make any changes to MinPluto on your instance, you must make it public and state what you’ve changed, and provide a link to the modified source code in `CUSTOM_SOURCE_CODE`.nnAll domains should NOT end with a `/`.nnInstall packages:nn* [NPM](https://sudovanilla.com/docs/minpluto/selfhosting/#tab-panel-0)nn* [Bun](https://sudovanilla.com/docs/minpluto/selfhosting/#tab-panel-1)nn* [Yarn](https://sudovanilla.com/docs/minpluto/selfhosting/#tab-panel-2)nn* [PNPM](https://sudovanilla.com/docs/minpluto/selfhosting/#tab-panel-3)nn```nnpm installn```nnThen run:nn* [NPM](https://sudovanilla.com/docs/minpluto/selfhosting/#tab-panel-4)nn* [Bun](https://sudovanilla.com/docs/minpluto/selfhosting/#tab-panel-5)nn* [Yarn](https://sudovanilla.com/docs/minpluto/selfhosting/#tab-panel-6)nn* [PNPM](https://sudovanilla.com/docs/minpluto/selfhosting/#tab-panel-7)nn```nnpm startn```nnMinPluto should launch on the default port, which should be at [http://0.0.0.0:1930](http://0.0.0.0:1930).nn","url":"/docs/minpluto/self-hosting"},{"id":67,"title":"Support","body":"If you need help with something, email me.n","url":"/docs/minpluto/support"}] \ No newline at end of file diff --git a/search-sh.sh b/search-sh.sh deleted file mode 100644 index da20ba1..0000000 --- a/search-sh.sh +++ /dev/null @@ -1,39 +0,0 @@ -# If the docs were updated, this script can update -# the databases for Meilisearch. -# JSON is used in Astro to create these databases. -# For whatever reason, Astro does not generate a -# valid JSON response, so the commands below `wget` -# will modify the file to remove "'" at the start -# and end, along with "\" at each part. - -# So, this scripts helps generates a valid JSON file -# for Meiliseach to use. - -# Meilisearch requires each item to have an ID, I don't -# setup my stuff like this. So Astro will just assign -# a random number to each item using the Math.random() -# function. I do not care for assigning the correct number. - -# Example -## Script will download: -### "[{\"id\":26,\"title\":\"Introduction\"},{\"id\":88,\"title\":\"Self-Hosting\"}]" <-- This is NOT a valid JSON format -## Script will output: -### [{"id":26,"title":"Introduction"},{"id":88,"title":"Self-Hosting"}] <-- This is a valid JSON format - -wget "http://localhost:2014/docs/json/minpluto.json" -mv minpluto.json minpluto-search.json -sed -i '$ s/.$//' minpluto-search.json -sed -i '0,/./s/^.//' minpluto-search.json -sed -i 's|[\]||g' minpluto-search.json - - - -wget "http://localhost:2014/docs/json/zorn.json" -mv zorn.json zorn-search.json -sed -i '$ s/.$//' zorn-search.json -sed -i '0,/./s/^.//' zorn-search.json -sed -i 's|[\]||g' zorn-search.json - -# Update Meilisearch -# Using "node" does not work, use "bun" -bun ./search.js \ No newline at end of file diff --git a/search.js b/search.js deleted file mode 100644 index ddff9d3..0000000 --- a/search.js +++ /dev/null @@ -1,13 +0,0 @@ -import { MeiliSearch } from 'meilisearch' -import MinPluto from './minpluto-search.json' -import Zorn from './zorn-search.json' - -const client = new MeiliSearch({ - host: process.env.MeilisearchHost, - apiKey: process.env.MeilisearchApiKey -}) - -client.index('MinPluto').delete(MinPluto).then((res) => console.log(res)) -client.index('MinPluto').addDocuments(MinPluto).then((res) => console.log(res)) -client.index('Zorn').delete(Zorn).then((res) => console.log(res)) -client.index('Zorn').addDocuments(Zorn).then((res) => console.log(res)) \ No newline at end of file diff --git a/src/components/Service.astro b/src/components/Service.astro index 12917f6..8d6866f 100644 --- a/src/components/Service.astro +++ b/src/components/Service.astro @@ -7,9 +7,6 @@ const { Source, Link } = Astro.props - -// Icons -import {CheckCircleSolid, XmarkCircleSolid} from '@iconoir/vue' ---
diff --git a/src/components/blog/posts.astro b/src/components/blog/posts.astro index a6ae105..fe215ff 100644 --- a/src/components/blog/posts.astro +++ b/src/components/blog/posts.astro @@ -1,47 +1,91 @@ --- -// Properties -const { - GetPosts, - PrefixSlug -} = Astro.props - - - -// Sort the posts in descending order (newest to oldest) -GetPosts.sort((a, b) => Date.parse(b.data.date) - Date.parse(a.data.date)) - -// Show Author in "Recommended Reading" -if (Astro.url.pathname = '/blog/recommended-reading/') { - var ShowAuthor = true -} else { - var ShowAuthor = false -} - -// Use External URL in "Recommended Reading" -if (Astro.url.pathname = '/blog/recommended-reading/') { - var ExternalURL = true -} else { - var ExternalURL = false -} +import { ghostClient } from "@library/ghost"; +const posts = await ghostClient.posts + .browse({ + limit: "all", + }) + .catch((err) => { + console.error(err); + }); --- + + + +
+ diff --git a/src/components/docs/SearchBox.astro b/src/components/docs/SearchBox.astro deleted file mode 100644 index 7c12b55..0000000 --- a/src/components/docs/SearchBox.astro +++ /dev/null @@ -1,199 +0,0 @@ ---- -// Components -import MeiliSearch from "@components/docs/search"; - -// Is this thing on? -let EnableSearch = true ---- - -{EnableSearch ? - -
- -
- : - null -} - - - - diff --git a/src/components/docs/search.jsx b/src/components/docs/search.jsx deleted file mode 100644 index 56d9814..0000000 --- a/src/components/docs/search.jsx +++ /dev/null @@ -1,34 +0,0 @@ -// ew, React ;-; -import React from 'react' - -// Meilisearch Components -import { InstantSearch, SearchBox, Hits, Highlight } from 'react-instantsearch' -import { instantMeiliSearch } from '@meilisearch/instant-meilisearch' - - -const { searchClient } = instantMeiliSearch( - 'http://localhost:7700', - 'aSampleMasterKe1' -) - -const App = () => ( - - - - -) - -const Documents = ({hit}) => ( - -
-

-

{hit.project}

-
-

-
-) - -export default App \ No newline at end of file diff --git a/src/components/init/SoftwareItem.astro b/src/components/init/SoftwareItem.astro index faf0bbd..06985a3 100644 --- a/src/components/init/SoftwareItem.astro +++ b/src/components/init/SoftwareItem.astro @@ -4,8 +4,7 @@ const { title, developer, homepage, - source, - screenshot + source } = Astro.props --- diff --git a/src/components/keystatic/Image.astro b/src/components/keystatic/Image.astro deleted file mode 100644 index f9175d7..0000000 --- a/src/components/keystatic/Image.astro +++ /dev/null @@ -1,8 +0,0 @@ ---- -const { - Alt, - Source -} = Astro.props; ---- - -{Alt} \ No newline at end of file diff --git a/src/layouts/Document.astro b/src/layouts/Document.astro index 93f1175..4950f46 100644 --- a/src/layouts/Document.astro +++ b/src/layouts/Document.astro @@ -7,9 +7,6 @@ const { // Layout import Default from "@layouts/Default.astro"; -// Components -import Sidebar from "@components/docs/sidebar.astro"; - // Icons import { WarningTriangleSolid diff --git a/zorn-search.json b/zorn-search.json deleted file mode 100644 index 86d8ef3..0000000 --- a/zorn-search.json +++ /dev/null @@ -1 +0,0 @@ -[{"id":75,"title":"Introduction","body":"**Zorn is currently in beta stages. Not everything listed below, as in it’s feature set, is not not done or hasn’t been worked on yet.**nn## IntroductionnnZorn is a customizable HTML5 video player. The player is originally built for a SudoVanilla project called MinPluto, a privacy frontend for YouTube.nn### What is a HTML5 Video Player?nnHTML5 introduced the video player element in the late 2010s, which is embeded as `