Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ajh123 committed May 9, 2023
2 parents d830f81 + c74478a commit 1325d5a
Show file tree
Hide file tree
Showing 20 changed files with 46 additions and 345 deletions.
5 changes: 5 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ export default defineConfig({
react(),
],
site: `https://minersonline.tk`,
vite: {
resolve: {
preserveSymlinks: true
}
}
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@example/docs",
"name": "@miners_online/docs",
"type": "module",
"version": "0.0.1",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (currentPage.startsWith("/docs")) {
<a href="/" class="navbar-item">
Home
</a>
<a href="/docs/en/history-survival" class="navbar-item">
<a href="/docs/history_survival/en_gb" class="navbar-item">
Documentation
</a>
<a href="/blog" class="navbar-item">
Expand Down
43 changes: 23 additions & 20 deletions src/consts.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const SITE = {
title: 'Miners Online',
description: 'Miners Online - the developers of History Survival.',
defaultLanguage: 'en-us',
defaultLanguage: 'en_gb',
} as const;

export const OPEN_GRAPH = {
Expand All @@ -15,32 +15,35 @@ export const OPEN_GRAPH = {
};

export const KNOWN_LANGUAGES = {
English: 'en',
'English UK': 'en_gb',
'English US': 'en_us',
} as const;
export const KNOWN_LANGUAGE_CODES = Object.values(KNOWN_LANGUAGES);

export const GITHUB_EDIT_URL = `https://github.com/ajh123-development/website/tree/main`;

export const COMMUNITY_INVITE_URL = `https://discord.gg/MMwxg32`;

// See "Algolia" section of the README for more information.
export const ALGOLIA = {
indexName: 'XXXXXXXXXX',
appId: 'XXXXXXXXXX',
apiKey: 'XXXXXXXXXX',
};

export type Sidebar = Record<
(typeof KNOWN_LANGUAGE_CODES)[number],
(string)[number],
Record<string, { text: string; link: string }[]>
>;
export const SIDEBAR: Sidebar = {
en: {
'History Survival': [
{ text: 'Introduction', link: 'docs/en/history-survival' },
{ text: 'Multiplayer', link: 'docs/en/history-survival/multiplayer' },
{ text: 'Text Formaatting', link: 'docs/en/history-survival/formatting-text' },
{ text: 'JSON text', link: 'docs/en/history-survival/json-text' },
],
},
};
export const SIDEBAR: Sidebar = {};


import type { SiteConfig } from "./site-config";
import HISTORY_SURVIVAL from "./sites/HistorySurvival/site-config.json";
const siteConfig: SiteConfig = HISTORY_SURVIVAL;

Object.keys(siteConfig.projects.docs).forEach(function(lang) {
SIDEBAR[lang] = {}
SIDEBAR[lang][siteConfig.site_name[lang]] = []
Object.keys(siteConfig.projects.docs[lang].sidebar).forEach(function(pageIndex) {
var page = siteConfig.projects.docs[lang].sidebar[pageIndex]
var newPage = {
text: page.text,
link: "."+page.link
}
SIDEBAR[lang][siteConfig.site_name[lang]][(pageIndex as unknown) as number] = newPage;
});
});
1 change: 1 addition & 0 deletions src/content/blog/history_survival
23 changes: 0 additions & 23 deletions src/content/blog/history_survival/en_gb/history-survival-0-0-1.md

This file was deleted.

30 changes: 0 additions & 30 deletions src/content/blog/history_survival/en_gb/history-survival-0-0-2.md

This file was deleted.

26 changes: 0 additions & 26 deletions src/content/blog/history_survival/en_gb/history-survival-0-0-3.md

This file was deleted.

25 changes: 0 additions & 25 deletions src/content/blog/history_survival/en_gb/history-survival-0-0-4.md

This file was deleted.

This file was deleted.

3 changes: 1 addition & 2 deletions src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { defineCollection, z } from 'astro:content';
import { SITE } from '../consts';
import { SITE } from '../consts.js';

const docs = defineCollection({
schema: z.object({
title: z.string().default(SITE.title),
description: z.string().default(SITE.description),
lang: z.literal('en-us').default(SITE.defaultLanguage),
dir: z.union([z.literal('ltr'), z.literal('rtl')]).default('ltr'),
image: z
.object({
Expand Down
1 change: 1 addition & 0 deletions src/content/docs/history_survival
81 changes: 0 additions & 81 deletions src/content/docs/history_survival/en_gb/formatting-text.md

This file was deleted.

22 changes: 0 additions & 22 deletions src/content/docs/history_survival/en_gb/index.md

This file was deleted.

57 changes: 0 additions & 57 deletions src/content/docs/history_survival/en_gb/json-text.md

This file was deleted.

Loading

0 comments on commit 1325d5a

Please sign in to comment.