diff --git a/README.md b/README.md index 832cde8..a783491 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,86 @@ > The image shown is a concept +## Support Center and Documents +All articles for Flux's support center is located at `/src/content/docs/support/` + +All documents such as Terms of Service or when polices need to be added, they should be located at `/src/content/docs/`. + +### Writing an Article +All articles are written in Markdown, do make sure you're adding the markdown file to the appropriate category folder. + +Articles, at the least, should have a title and last updated: +```md +--- +title: Title of Article +lastUpdated: 2024-03-15 +--- +``` + +### Frontmatter +In each article, there are plenty of options to add to the frontmatter which can be used to add stuff such as banners, table of contents, and other variables. + +#### Banners +![Banner Example](https://img.sudovanilla.com/4My6Qw0.png) + +To add a banner, add the following: +```md +--- +banner: + content: | + This is an example of a banner. + Important Link +--- +``` + +#### Table of Contents +![Table of Contents Preview](https://img.sudovanilla.com/6Ovnadk.png) + +If for whatever reason you want to enable the table of contents for an article, you can enable by adding: +```md +--- +tableOfContents: true +--- +``` + +#### Badge + + +Badges can be used to add a little text next to the article name like "New" or "Outdated". + +Varients: `note` | `tip` | `caution` | `danger` | `success` | `default` + +```md +--- +sidebar: + badge: + text: Outdated + variant: caution +--- +``` + +#### Slug +If you need to override the URL, you can use `slug`. + +```md +--- +slug: /support/minecraft/world-management +--- +``` + +#### Layouts +This should only be set for documents such as Terms of Service and polices. + +Starlight provides two options: `doc` | `splash` + +The `doc` layouts includes both the sidebar and content, useful for articles. The `splash` layout removes the sidebar. + +```md +--- +template: splash +--- +``` + ## Development ### Requirements - [Bun](https://bun.sh/) diff --git a/bun.lockb b/bun.lockb index b7c86b6..e41b5e0 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 44cb386..d6263af 100644 --- a/package.json +++ b/package.json @@ -6,21 +6,24 @@ "scripts": { "start": "astro dev ", "dev": "astro dev", - "build": "yarn run translate && astro build", - "translate": "astro-i18next generate", + "build": "bun run translate && astro build", + "translate": "astro-i18next generate" }, "dependencies": { - "@astrojs/mdx": "^2.1.0", + "@astrojs/mdx": "^2.1.1", "@astrojs/node": "^8.1.0", "@astrojs/partytown": "^2.0.4", + "@astrojs/starlight": "^0.17.1", "@astrojs/vue": "^4.0.8", "@iconoir/vue": "^7.3.0", "@shoelace-style/shoelace": "^2.13.1", "astro": "^4.2.6", "astro-compress": "^2.2.8", + "astro-feelback": "^0.3.4", "astro-font-picker": "^0.2.1", "astro-i18next": "^1.0.0-beta.21", "astro-useragent": "^4.0.1", + "dayjs": "^1.11.10", "sass": "^1.70.0", "shikiji-core": "^0.10.2" }, diff --git a/src/content/config.ts b/src/content/config.ts new file mode 100644 index 0000000..19adf2b --- /dev/null +++ b/src/content/config.ts @@ -0,0 +1,6 @@ +import { defineCollection } from 'astro:content'; +import { docsSchema } from '@astrojs/starlight/schema'; + +export const collections = { + docs: defineCollection({ schema: docsSchema() }), +}; \ No newline at end of file diff --git a/src/content/docs/terms-of-service.mdx b/src/content/docs/terms-of-service.mdx new file mode 100644 index 0000000..978e992 --- /dev/null +++ b/src/content/docs/terms-of-service.mdx @@ -0,0 +1,6 @@ +--- +title: Terms of Service +template: splash +lastUpdated: 2024-01-31 +pagefind: false +--- \ No newline at end of file diff --git a/src/env.d.ts b/src/env.d.ts index f964fe0..acef35f 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1 +1,2 @@ +/// /// diff --git a/src/pages/index.astro b/src/pages/index.astro index 2b78358..40e49c2 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -5,4 +5,4 @@ import Layout from "@layouts/Default.astro"; changeLanguage("en"); --- - \ No newline at end of file + \ No newline at end of file diff --git a/src/pages/pricing.astro b/src/pages/pricing.astro new file mode 100644 index 0000000..9ed545c --- /dev/null +++ b/src/pages/pricing.astro @@ -0,0 +1,8 @@ +--- +import { changeLanguage } from "i18next"; +import Layout from "@layouts/Default.astro"; + +changeLanguage("en"); +--- + + \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index 4689991..4099c7d 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -16,4 +16,10 @@ body { a { color: white; } +} + +.content { + max-width: 1200px; + width: 100%; + margin: 90px auto auto auto; } \ No newline at end of file