init from me

This commit is contained in:
Erik Grobecker 2024-09-28 13:04:57 +02:00
parent 2ce40940bc
commit 442db50e08
Signed by: Erik
GPG key ID: 80D020D0ABBD3FB2
11 changed files with 730 additions and 84 deletions

View file

@ -1,4 +1,9 @@
{
"recommendations": ["astro-build.astro-vscode"],
"recommendations": [
"astro-build.astro-vscode",
"xyc.vscode-mdx-preview",
"pkief.material-icon-theme",
"unifiedjs.vscode-mdx"
],
"unwantedRecommendations": []
}

View file

@ -1,55 +1,3 @@
# Starlight Starter Kit: Basics
# My Starlight Docu
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
```
npm create astro@latest -- --template starlight
```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🚀 Project Structure
Inside of your Astro + Starlight project, you'll see the following folders and files:
```
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
```
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
Static assets, like favicons, can be placed in the `public/` directory.
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
## 👀 Want to learn more?
Check out [Starlights docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
see some commands [here](./starlight.md)

View file

@ -1,5 +1,7 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import remarkMath from 'remark-math';
import rehypeMathjax from 'rehype-mathjax';
// https://astro.build/config
export default defineConfig({
@ -15,6 +17,9 @@ export default defineConfig({
items: [
// Each item here is one entry in the navigation menu.
{ label: 'Example Guide', slug: 'guides/example' },
{ label: 'Privacy', slug: 'guides/privacy' },
{ label: 'Authoring Tools', slug: 'guides/authoring' }
// { label: 'Mathe Klausur', slug: 'guides/math'}
],
},
{
@ -22,6 +27,22 @@ export default defineConfig({
autogenerate: { directory: 'reference' },
},
],
defaultLocale: 'root',
locales: {
// English docs in `src/content/docs/en/`
root: {
label: 'English',
lang: "en",
},
// de: {
// label: 'Deutsch',
// },
},
}),
],
markdown: {
remarkPlugins: [remarkMath], // I need math support!
rehypePlugins: [rehypeMathjax],
},
});

View file

@ -11,7 +11,9 @@
},
"dependencies": {
"@astrojs/starlight": "^0.28.2",
"astro": "^4.15.3",
"astro": "^4.15.9",
"rehype-mathjax": "^6.0.0",
"remark-math": "^6.0.0",
"sharp": "^0.32.5"
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,11 @@
---
title: Example Guide
description: A guide in my new Starlight docs site.
---
Guides lead a user through a specific task they want to accomplish, often with a sequence of steps.
Writing a good guide requires thinking about what your users are trying to do.
## Further reading
- Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework

View file

@ -0,0 +1,36 @@
---
title: Welcome to my site
# description: Get started building your docs site with Starlight.
template: splash
hero:
tagline: Here be dragons! Idk what I am doing. hihihihiia
image:
file: ../../../assets/houston.webp
actions:
- text: Example Guide
link: /guides/example/
# icon: right-arrow
# - text: Read the Starlight docs
# link: https://starlight.astro.build
# icon: external
# variant: minimal
---
import { Card, CardGrid } from '@astrojs/starlight/components';
{/* ## Next steps
<CardGrid stagger>
<Card title="Update content" icon="pencil">
Edit `src/content/docs/index.mdx` to see this page change.
</Card>
<Card title="Add new content" icon="add-document">
Add Markdown or MDX files to `src/content/docs` to create new pages.
</Card>
<Card title="Configure your site" icon="setting">
Edit your `sidebar` and other config in `astro.config.mjs`.
</Card>
<Card title="Read the docs" icon="open-book">
Learn more in [the Starlight Docs](https://starlight.astro.build/).
</Card>
</CardGrid> */}

View file

@ -0,0 +1,56 @@
---
title: Authoring Tools
---
{/* TODO: Comparison Table */}
## Typst
Typst is a new markup-based typesetting system for the sciences. It is designed to be an alternative both to advanced tools like LaTeX and simpler tools like Word and Google Docs.
### Template
```typst
//template.typ
#let apply-template(body) = [
#set text(lang: "de")
#set page(
margin: auto,
paper: "a4"
)
#set outline(indent: 1.2em)
#let clean_numbering(..schemes) = {
(..nums) => {
let (section, ..subsections) = nums.pos()
let (section_scheme, ..subschemes) = schemes.pos()
if subsections.len() == 0 {
numbering(section_scheme, section)
} else if subschemes.len() == 0 {
numbering(section_scheme, ..nums.pos())
}
else {
clean_numbering(..subschemes)(..subsections)
}
}
}
#set heading(numbering: clean_numbering("A.", "I.", "1.a."))
#set math.equation(numbering: "(1)", supplement: "equation")
// Customization of text elements
#set par(justify: true)
#show link: underline
// here are replacements for commonly used shortcuts
#show "z.B.": text[zum Beispiel]
#body // IMPORTANT: must be at the very bottom, ekse the body will be overwritten
]
```
## Markdown
## Latex

View file

@ -0,0 +1,26 @@
---
title: Privacy
description: Here are some tools and practices I recommend you should use to ensure privacy
---
import { Card, CardGrid } from '@astrojs/starlight/components';
{/* <CardGrid>
<Card title="Check this out" icon="open-book">
Interesting content you want to highlight.
</Card>
<Card title="Other feature" icon="information">
More information you want to share.
</Card>
</CardGrid> */}
## Password Managers
| asd | bsd |
| --- | --- |
| I | like|
### KeepassXC
### Bitwarden

View file

@ -1,24 +1,24 @@
---
title: Welcome to Starlight
description: Get started building your docs site with Starlight.
title: Welcome to my site
# description: Get started building your docs site with Starlight.
template: splash
hero:
tagline: Congrats on setting up a new Starlight project!
tagline: Here be dragons! Idk what I am doing.
image:
file: ../../assets/houston.webp
actions:
- text: Example Guide
link: /guides/example/
icon: right-arrow
- text: Read the Starlight docs
link: https://starlight.astro.build
icon: external
variant: minimal
# icon: right-arrow
# - text: Read the Starlight docs
# link: https://starlight.astro.build
# icon: external
# variant: minimal
---
import { Card, CardGrid } from '@astrojs/starlight/components';
## Next steps
{/* ## Next steps
<CardGrid stagger>
<Card title="Update content" icon="pencil">
@ -33,4 +33,4 @@ import { Card, CardGrid } from '@astrojs/starlight/components';
<Card title="Read the docs" icon="open-book">
Learn more in [the Starlight Docs](https://starlight.astro.build/).
</Card>
</CardGrid>
</CardGrid> */}

55
starlight.md Normal file
View file

@ -0,0 +1,55 @@
# Starlight Starter Kit: Basics
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
```
npm create astro@latest -- --template starlight
```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🚀 Project Structure
Inside of your Astro + Starlight project, you'll see the following folders and files:
```
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
```
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
Static assets, like favicons, can be placed in the `public/` directory.
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
## 👀 Want to learn more?
Check out [Starlights docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).