Redone docs site in astro

This commit is contained in:
Toastie 2024-01-20 17:46:30 +13:00
parent 8ee8464244
commit 29a63a9d4e
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
42 changed files with 8070 additions and 9687 deletions

31
.gitignore vendored
View file

@ -1,20 +1,21 @@
# Dependencies
/node_modules
# build output
dist/
# generated types
.astro/
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store

4
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}

11
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}

View file

@ -1,128 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
devs@elliebot.net.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View file

@ -1,10 +1,6 @@
# EllieBot Docs
EllieBot Docs ©2018-2023 toastie_t0ast
## Badges
[![Netlify Status](https://api.netlify.com/api/v1/badges/59b2c52e-91cf-496f-b520-cf3915215be1/deploy-status)](https://app.netlify.com/sites/elliebotdocs/deploys)
EllieBot Docs ©2018-2024 toastie_t0ast
## Contribution Guide

33
astro.config.mjs Normal file
View file

@ -0,0 +1,33 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'Ellie Docs',
social: {
github: 'https://toastielab.dev/EllieBotDevs/EllieBot-docs',
discord: 'https://discord.gg/etQdZxSyEH',
},
sidebar: [
{
label: 'Ellie v4',
autogenerate: { directory: 'v4' },
},
{
label: 'Ellie v5',
autogenerate: { directory: 'v5' },
},
{
label: 'SupportChild',
autogenerate: { directory: 'supportchild' },
},
{
label: 'Holana',
autogenerate: { directory: 'holana' },
},
],
}),
],
});

View file

@ -1,3 +0,0 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};

View file

@ -1,8 +0,0 @@
{
"label": "Holana",
"position": 5,
"link": {
"type": "generated-index",
"description": "The documentation for Holana."
}
}

View file

@ -1,8 +0,0 @@
{
"label": "SupportChild",
"position": 4,
"link": {
"type": "generated-index",
"description": "The documentation for SupportChild."
}
}

View file

@ -1,19 +0,0 @@
---
sidebar_position: 1
slug: /
---
# Home
This site hosts users guides for EllieBot
:::info[The Elliebot project links]
If you want to invite Ellie you can use [this link](https://discordapp.com/oauth2/authorize?client_id=608119997713350679&scope=bot&permissions=66186303)
Her commands are located at https://commands.elliebot.net
You can find Ellie's site at https://elliebot.net
You can also find the blog for the porject at https://blog.elliebot.net
:::

View file

@ -1,8 +0,0 @@
{
"label": "Ellie v4",
"position": 2,
"link": {
"type": "generated-index",
"description": "The documentation for Elliebot v4."
}
}

View file

@ -1,8 +0,0 @@
{
"label": "Ellie v5",
"position": 3,
"link": {
"type": "generated-index",
"description": "The documentation for the upcoming v5 update."
}
}

View file

@ -1,7 +0,0 @@
---
sidebar_position: 1
---
# Under construction
## This section of the documentation is coming soon!

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

View file

@ -1,107 +0,0 @@
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import {themes as prismThemes} from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Elliebot Docs',
tagline: 'The documentation site for Elliebot',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://docs.elliebot.net',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: '', // Usually your GitHub org/user name.
projectName: '', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/',
sidebarPath: './sidebars.js',
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
navbar: {
title: 'Elliebot docs',
logo: {
alt: 'My Site Logo',
src: 'img/logo.png',
},
items: [
{
href: 'https://toastielab.dev/EllieBotDevs/EllieBot-docs',
label: 'Toastielab',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.com/invite/SVQVzJq',
},
],
},
{
title: 'More',
items: [
{
label: 'Toastielab',
href: 'https://toastielab.dev/EllieBotDevs/EllieBot-docs',
},
{
label: 'Our blog',
href: 'https://blog.elliebot.net'
}
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} EllieBotDevs`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};
export default config;

7932
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,44 +1,19 @@
{
"name": "elliebot-docs",
"version": "0.0.0",
"private": true,
"name": "ellie-docs",
"type": "module",
"version": "0.0.1",
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@docusaurus/core": "3.0.0",
"@docusaurus/preset-classic": "3.0.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.2.1",
"prism-react-renderer": "^2.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.0.0",
"@docusaurus/types": "3.0.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
"@astrojs/check": "^0.4.1",
"@astrojs/starlight": "^0.16.0",
"astro": "^4.2.1",
"sharp": "^0.32.5",
"typescript": "^5.3.3"
}
}

File diff suppressed because it is too large Load diff

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

1
public/favicon.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" d="M81 36 64 0 47 36l-1 2-9-10a6 6 0 0 0-9 9l10 10h-2L0 64l36 17h2L28 91a6 6 0 1 0 9 9l9-10 1 2 17 36 17-36v-2l9 10a6 6 0 1 0 9-9l-9-9 2-1 36-17-36-17-2-1 9-9a6 6 0 1 0-9-9l-9 10v-2Zm-17 2-2 5c-4 8-11 15-19 19l-5 2 5 2c8 4 15 11 19 19l2 5 2-5c4-8 11-15 19-19l5-2-5-2c-8-4-15-11-19-19l-2-5Z" clip-rule="evenodd"/><path d="M118 19a6 6 0 0 0-9-9l-3 3a6 6 0 1 0 9 9l3-3Zm-96 4c-2 2-6 2-9 0l-3-3a6 6 0 1 1 9-9l3 3c3 2 3 6 0 9Zm0 82c-2-2-6-2-9 0l-3 3a6 6 0 1 0 9 9l3-3c3-2 3-6 0-9Zm96 4a6 6 0 0 1-9 9l-3-3a6 6 0 1 1 9-9l3 3Z"/><style>path{fill:#000}@media (prefers-color-scheme:dark){path{fill:#fff}}</style></svg>

After

Width:  |  Height:  |  Size: 696 B

View file

@ -1,33 +0,0 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
// @ts-check
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};
module.exports = sidebars;

BIN
src/assets/ellie.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

View file

@ -1,11 +0,0 @@
.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}
.featureSvg {
height: 200px;
width: 200px;
}

7
src/content/config.ts Normal file
View file

@ -0,0 +1,7 @@
import { defineCollection } from 'astro:content';
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';
export const collections = {
docs: defineCollection({ schema: docsSchema() }),
i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
};

View file

@ -1,3 +1,7 @@
---
title: Holana commands
---
:::note
This page is scheduled for an update

View file

@ -0,0 +1,13 @@
---
title: Welcome to Ellie Docs
template: splash
hero:
tagline: We hope you find what you are looking for!
image:
file: ../../assets/ellie.png
actions:
- text: v4 Guides
link: /v4/
icon: right-arrow
variant: primary
---

View file

@ -1,5 +1,6 @@
---
sidebar_position: 1
title: SupportChild commands
description: Here is the full command list for SupportChild
---
# Commands

View file

@ -1,5 +1,5 @@
---
sidebar_position: 1
title: Ellie v4 Expressions
---
# Expressions
@ -45,4 +45,4 @@ Now if you try to trigger `/o/`, it won't print anything even if there is a glob
### Placeholders!
To learn about placeholders, go [here](placeholders.md)
To learn about placeholders, go [here](placeholders.md)

View file

@ -0,0 +1,8 @@
---
title: v4 home
---
### Here is a list of the pages in this category
## [Ellie v4 expressions](/v4/expressions)
## [Ellie v4 placeholders](/v4/placeholders)
## [Ellie v4 permissions system](/v4/permissions-system)

View file

@ -1,10 +1,10 @@
---
sidebar_position: 3
title: Ellie v4 Permissions System
---
# Permissions Overview
Have you ever felt confused or even overwhelmed when trying to set Nadeko's permissions? In this guide we will be explaining **how to use the permission commands correctly** and even **cover a few common questions**! Every command we discuss here can be found in the [Commands List].
Have you ever felt confused or even overwhelmed when trying to set Ellie's permissions? In this guide we will be explaining **how to use the permission commands correctly** and even **cover a few common questions**! Every command we discuss here can be found in the [Commands List].
## Why do we use the Permissions Commands?
@ -61,9 +61,9 @@ To allow users to only see the current song and have a DJ role for queuing follo
1. `'sm Music disable`
- Disables music commands for everybody
2. `'sc .nowplaying enable`
2. `'sc 'nowplaying enable`
- Enables the "nowplaying" command for everyone
3. `'sc .listqueue enable`
3. `'sc 'listqueue enable`
- Enables the "listqueue" command for everyone
4. `'rm Music enable DJ`
- Enables all music commands only for the DJ role
@ -93,4 +93,4 @@ Yes, there is a way, in one easy command!
1. `'resetperms`
- This resets the permission chain back to default
[Commands List]: https://commands.elliebot.net
[Commands List]: https://commands.elliebot.net

View file

@ -1,5 +1,5 @@
---
sidebar_position: 2
title: Ellie v4 Placeholders
---
# Placeholders

View file

@ -1,4 +1,6 @@
# Contributing
---
title: Ellie v5 Contribution guidelines
---
## Hey there!
If you are on this page that means you either want to help us or you are just curious about our project our contribution steps for the Ellie bot project are below

View file

@ -0,0 +1,9 @@
---
title: About this category
---
:::note
This category is under construction.
:::

View file

@ -1,30 +0,0 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

2
src/env.d.ts vendored Normal file
View file

@ -0,0 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />

View file

@ -1,23 +0,0 @@
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.
*/
.heroBanner {
padding: 4rem 0;
text-align: center;
position: relative;
overflow: hidden;
}
@media screen and (max-width: 996px) {
.heroBanner {
padding: 2rem;
}
}
.buttons {
display: flex;
align-items: center;
justify-content: center;
}

View file

@ -1,7 +0,0 @@
---
title: Markdown page example
---
# Markdown page example
You don't need React to write simple standalone pages.

View file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

3
tsconfig.json Normal file
View file

@ -0,0 +1,3 @@
{
"extends": "astro/tsconfigs/strict"
}