Skip to content

Commit

Permalink
Updates from Andromeda's wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
melontini committed Apr 8, 2024
1 parent 50b5b18 commit ba52b8e
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
docs/.vitepress/cache/*
docs/.vitepress/cache/*
docs/.vitepress/dist/*
Binary file modified bun.lockb
Binary file not shown.
8 changes: 6 additions & 2 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ export default defineConfig({

head: [
['link', { rel: 'icon', type: 'image/png', href: '/commander/favicon.png' }],
['link', { rel: 'shortcut icon', type: 'image/png', href: '/commander/favicon.png' }]
['link', { rel: 'shortcut icon', type: 'image/png', href: '/commander/favicon.png' }],
['meta', { name: "robots", content: "noai, noimageai" }],
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
['link', { href: 'https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap', rel: 'stylesheet' }]
],

markdown: {
Expand Down Expand Up @@ -68,7 +72,7 @@ export default defineConfig({
...en
},
"zh-cn": {
label: "群星模组",
label: "简体中文",
link: "/zh-cn/",
...zh_cn
}
Expand Down
60 changes: 51 additions & 9 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,59 @@
// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import type { Theme } from 'vitepress'
import giscusTalk from 'vitepress-plugin-comment-with-giscus';
import type { Theme, VitePressData } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './style.css'
import { useData, useRoute } from 'vitepress';
import { toRefs } from "vue";
import { watch, nextTick, onMounted } from 'vue';
import { GiscusProps } from '@giscus/vue/dist/types'

export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
...DefaultTheme,
enhanceApp(ctx) {
DefaultTheme.enhanceApp(ctx);
},
enhanceApp({ app, router, siteData }) {
// ...
setup() {
// Get frontmatter and route
const data = useData();
const { frontmatter } = toRefs(data);
const route = useRoute();

var props: GiscusProps = {
repo: 'constellation-mc/commander',
repoId: 'R_kgDOLkDGFQ',
category: 'Comments',
categoryId: 'DIC_kwDOLkDGFc4Ceihw',
mapping: 'pathname',
inputPosition: 'top',
reactionsEnabled: '1',
loading: 'eager'
}

onMounted(() => {
fixLang(props, data);
})
watch(() => route.path, () => nextTick(() => {
fixLang(props, data);
}))

// Obtain configuration from: https://giscus.app/
giscusTalk(props, { frontmatter, route }, true);
}
} satisfies Theme

const fixLang = (props: GiscusProps, data: VitePressData) => {
var lang = data.lang.value
switch (lang) {
case "en-US":
lang = "en"
break;
case "zh-CN":
lang = "zh-CN"
break;
default:
lang = "en"
break;
}
props.lang = lang
}
3 changes: 3 additions & 0 deletions docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
--vp-c-danger-2: var(--vp-c-red-2);
--vp-c-danger-3: var(--vp-c-red-3);
--vp-c-danger-soft: var(--vp-c-red-soft);

--vp-font-family-base: "Rubik", sans-serif;
--vp-font-family-mono: "Ubuntu Mono", monospace;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
comment: false
---
# Commander <Badge type="warning" text="beta" />

Commander is an extension of the vanilla data pack system.
Expand Down
88 changes: 88 additions & 0 deletions docs/public/ai.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Spawning AI
# Prevent datasets from using the following file types

User-Agent: *
Disallow: *.txt
Disallow: *.pdf
Disallow: *.doc
Disallow: *.docx
Disallow: *.odt
Disallow: *.rtf
Disallow: *.tex
Disallow: *.wks
Disallow: *.wpd
Disallow: *.wps
Disallow: *.html
Disallow: *.bmp
Disallow: *.gif
Disallow: *.ico
Disallow: *.jpeg
Disallow: *.jpg
Disallow: *.png
Disallow: *.svg
Disallow: *.tif
Disallow: *.tiff
Disallow: *.webp
Disallow: *.aac
Disallow: *.aiff
Disallow: *.amr
Disallow: *.flac
Disallow: *.m4a
Disallow: *.mp3
Disallow: *.oga
Disallow: *.opus
Disallow: *.wav
Disallow: *.wma
Disallow: *.mp4
Disallow: *.webm
Disallow: *.ogg
Disallow: *.avi
Disallow: *.mov
Disallow: *.wmv
Disallow: *.flv
Disallow: *.mkv
Disallow: *.py
Disallow: *.js
Disallow: *.java
Disallow: *.c
Disallow: *.cpp
Disallow: *.cs
Disallow: *.h
Disallow: *.css
Disallow: *.php
Disallow: *.swift
Disallow: *.go
Disallow: *.rb
Disallow: *.pl
Disallow: *.sh
Disallow: *.sql
Disallow: /
Disallow: *
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@( @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% @@@@@@@@@
# @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@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ spawning.ai
20 changes: 20 additions & 0 deletions docs/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
User-agent: CCBot
Disallow: /

User-agent: ChatGPT-User
Disallow: /

User-agent: GPTBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: Omgilibot
Disallow: /

User-agent: Omgili
Disallow: /

User-agent: FacebookBot
Disallow: /
4 changes: 4 additions & 0 deletions docs/zh-cn/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
comment: false
---

# 命令官 <Badge type="warning" text="beta" />

命令官模组是对原版数据包系统的补充。
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"dependencies": {},
"devDependencies": {
"vitepress": "^1.0.2"
},
"dependencies": { "vitepress": "^1.0.2", "vitepress-plugin-comment-with-giscus": "^1.1.12" },
"scripts": {
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
Expand Down

0 comments on commit ba52b8e

Please sign in to comment.