Archived
Template
1
Fork 0

More minor updates

This commit is contained in:
Korbs 2024-01-31 07:00:17 -05:00
parent 483ea2043f
commit 7150cf05a6
No known key found for this signature in database
9 changed files with 114 additions and 4 deletions

View file

@ -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.
<a href="https://fluxnodes.net/">Important Link</a>
---
```
#### 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
<img width="300px" src="https://img.sudovanilla.com/BcyNUdH.png">
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/)

BIN
bun.lockb

Binary file not shown.

View file

@ -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"
},

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

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

View file

@ -0,0 +1,6 @@
---
title: Terms of Service
template: splash
lastUpdated: 2024-01-31
pagefind: false
---

1
src/env.d.ts vendored
View file

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

View file

@ -5,4 +5,4 @@ import Layout from "@layouts/Default.astro";
changeLanguage("en");
---
<Layout Title="FluxNodess" Selected="Home"></Layout>
<Layout Title="FluxNodess" Selected="Home"><Layout>

8
src/pages/pricing.astro Normal file
View file

@ -0,0 +1,8 @@
---
import { changeLanguage } from "i18next";
import Layout from "@layouts/Default.astro";
changeLanguage("en");
---
<Layout Title="FluxNodess" Selected="Pricing"><Layout>

View file

@ -16,4 +16,10 @@ body {
a {
color: white;
}
}
.content {
max-width: 1200px;
width: 100%;
margin: 90px auto auto auto;
}