From 615445401120c717c687db53ea85544dd621cc2f Mon Sep 17 00:00:00 2001 From: Korbs Date: Thu, 12 Dec 2024 20:59:43 -0500 Subject: [PATCH] :rocket: Init --- .gitignore | 1 + config.json | 45 ++++++++++++++ docker-compose.yml | 23 +++++++ docs/home.mdx | 9 +++ docs/installation.mdx | 137 ++++++++++++++++++++++++++++++++++++++++++ docs/introduction.mdx | 21 +++++++ docs/requirements.mdx | 39 ++++++++++++ 7 files changed, 275 insertions(+) create mode 100644 .gitignore create mode 100644 config.json create mode 100644 docker-compose.yml create mode 100644 docs/home.mdx create mode 100644 docs/installation.mdx create mode 100644 docs/introduction.mdx create mode 100644 docs/requirements.mdx diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f4bddde --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dists \ No newline at end of file diff --git a/config.json b/config.json new file mode 100644 index 0000000..540059b --- /dev/null +++ b/config.json @@ -0,0 +1,45 @@ +{ + "SiteSettings": { + "OrgName": "SudoVanilla", + "SiteName": "ButterflyVu", + "SiteProtocol": "https", + "SiteDomain": "butterflyvu.docs.sudovanilla.org", + "SiteBase": "", + "MetaColor": "#000", + "WhiteLabel": "false", + "FooterVersion": "false" + }, + "FeelbackConfig": { + "Enabled": false, + "ContentSetId": "566e8b96-c65e-4bf7-87df-d22a9f4994a2", + "Present": "like-dislike", + "Question": "Did this article help?", + "Answer": "Thank you for your feedback." + }, + "HeaderItems": [ + { + "text": "Source Code", + "link": "https://ark.sudovanilla.org/Korbs/Butterflyvu/" + } + ], + "SidebarItems": [ + { + "heading": "Introduction" + }, + { + "text": "Introduction", + "link": "/introduction/" + }, + { + "heading": "Setup" + }, + { + "text": "Requirements", + "link": "/requirements/" + }, + { + "text": "Installation", + "link": "/installation/" + } + ] +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..86693cd --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +services: + butterflyvu: + image: oci.registry.sudovanilla.org/butterflyvu:latest + restart: always + volumes: + # Configuration + - ./config.json:/app/config.json + # Homepage + - ./docs/home.mdx:/app/src/content/home.mdx + # Your Documentations + - ./docs/:/app/src/content/docs/ + # Use this add images locally and update your favicon + - ./public/:/app/public/ + # Generated, do not touch + - ./dists/:/app/dist/ + + nginx: + image: nginx:latest + restart: always + ports: + - 4242:80 + volumes: + - ./dists/:/usr/share/nginx/html/ \ No newline at end of file diff --git a/docs/home.mdx b/docs/home.mdx new file mode 100644 index 0000000..0371b8a --- /dev/null +++ b/docs/home.mdx @@ -0,0 +1,9 @@ +--- +layout: "@layouts/Splash.astro" +Title: "ButterflyVu Documentation" +Banner: "https://md.sudovanilla.org/images/logos/butterflyvu/ButterflyVu%20-%20Original.png" +PrimaryText: "Get Started" +SecondaryText: "Source Code" +PrimaryLink: "/introduction/" +SecondaryLink: "https://ark.sudovanilla.org/Korbs/ButterflyVu" +--- \ No newline at end of file diff --git a/docs/installation.mdx b/docs/installation.mdx new file mode 100644 index 0000000..a06f425 --- /dev/null +++ b/docs/installation.mdx @@ -0,0 +1,137 @@ +--- +Title: Introduction +Type: Document +--- + +import { Prism } from '@astrojs/prism'; + +## Setup Basic Structure + +Create a new folder that the entire project will go into and change directory: + + + +Create the Docker Compose file, `docker-compose.yml`: + + +Create the configuration file, `config.yml`: + + +## Setup Homepage + +You must create, as setup by the Docker Compose file, at `./docs/home.mdx` and must be a `.mdx` file. This is the root of the documentation website. + +It should look like this: + + +Using the Splash layout is not required, you can change `Splash` to `Document` for a regular view, which will also make the sidebar visible on the root page. + +## Add Documentations + +All of your documents should be added to `./docs/` as either `.md` or `.mdx` files. + +## Run + +To start ButterflyVu, with Docker, just run: + + +When you start the Docker container, NGINX will startup within it at the set port(usually `4242`), then ButterflyVu will begin to build the website to the `./dist/` directory which the NGINX container will point to and host statically. + +If NGINX is showing a 403 page, either the website is still being built or something went wrong. Run `docker compose logs` to see what's happening and debug it, using an unsupported feature in ButterflyVu could cause this or it may simply be a syntax error. + +Make sure you're pulling the official Docker image from ONLY the SudoVanilla OCI Registry, which is at `oci.registry.sudovanilla.org`, anywhere else is not official and anything outside of `sudovanilla.org` is out of my control. ButterflyVu is distributed as a OCI image, as of v0.1.6, but it shouldn't behave any differently than a regular Docker image. \ No newline at end of file diff --git a/docs/introduction.mdx b/docs/introduction.mdx new file mode 100644 index 0000000..6427e03 --- /dev/null +++ b/docs/introduction.mdx @@ -0,0 +1,21 @@ +--- +Title: Introduction +Type: Document +--- + +## What is it? + +ButterflyVu is a documentation website for your projects and company, built on Astro, compatible with Zorn. Easy to use and setup with any container-based tools such as Docker and Podman. + +## Showcase + +ButterflyVu is an in-house project, so most SudoVanilla projects are already using ButterflyVu for their documentations. + + - [Zorn Player](https://zorn.docs.sudovanilla.org) + - [Devojo](https://devojo.docs.sudovanilla.org) + +## Support + +If you're having issues with ButterflyVu, feel free to submit an issue to the repository on [SudoVanilla Ark](https://ark.sudovanilla.org/MinPluto/Zorn/). + +If you're unable to create an issue on either sites, for whatever reason, [email support](mailto:support-PLEASE-REMOVE-THIS-FOR-SPAM-PROTECTION@sudovanilla.org) is available. \ No newline at end of file diff --git a/docs/requirements.mdx b/docs/requirements.mdx new file mode 100644 index 0000000..912948b --- /dev/null +++ b/docs/requirements.mdx @@ -0,0 +1,39 @@ +--- +Title: Requirements +Type: Document +--- + +import { Prism } from '@astrojs/prism'; + +## With Astro + +If you're wanting to contribute to ButterflyVu and make changes yourself to the project itself, you'll need to have tools installed that work with building Astro websites. + +SudoVanilla recommends that you have at least Bun installed. With this, NodeJS is NOT required at all, Bun can work alone. SudoVanilla highly recommends using the Bun package manager for all Astro projects, if you need to implement i18n into your Astro website then you'll need NodeJS at that point. + +Install Bun with their bash script: + + +For Windows, I using the WSL with either Alpine or Debian, your choice. Or run `powershell -c "irm bun.sh/install.ps1 | iex"`. + +## With Docker + +### Production + +It is expected for the server admin to use the Docker method for production use, as it is recommended, so please install the Docker Engine. + + - [Install Docker Engine for Windows](https://nickjanetakis.com/blog/install-docker-in-wsl-2-without-docker-desktop) (WSL Method) + - [Install Docker Engine for macOS](https://formulae.brew.sh/formula/docker) (Homebrew Method) + - [Install Docker Engine for Linux](https://docs.docker.com/engine/install/#supported-platforms) + +SudoVanilla does NOT recommend using the Docker Desktop application, as it is proprietary software. + +That's it. + +### Development + +If you're planning on building your own Docker image, SudoVanilla uses `buildah`. + +You'll need Buildah to continue. Just run `bun run docker:build`. \ No newline at end of file